2014-07-16 18:59:17 +02:00
|
|
|
CC = g++
|
2014-09-23 03:44:09 +02:00
|
|
|
CFLAGS = -g -Wall
|
|
|
|
CXXVER := $(shell ${CC} -dumpversion)
|
|
|
|
|
2014-10-29 22:11:58 +01:00
|
|
|
FGREP = fgrep
|
|
|
|
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
|
|
|
|
|
2014-09-24 01:56:29 +02:00
|
|
|
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
|
|
|
|
CFLAGS += -std=c++11
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
|
|
|
CFLAGS += -std=c++11
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
|
|
|
CFLAGS += -std=c++0x
|
|
|
|
else # not supported
|
|
|
|
$(error Compiler too old)
|
2014-09-23 03:44:09 +02:00
|
|
|
endif
|
|
|
|
|
2014-09-24 01:56:29 +02:00
|
|
|
|
2014-07-17 19:12:52 +02:00
|
|
|
include filelist.mk
|
2014-08-17 07:35:09 +02:00
|
|
|
INCFLAGS =
|
2014-09-19 06:14:04 +02:00
|
|
|
LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
2014-08-17 07:35:09 +02:00
|
|
|
LIBS =
|
2014-07-16 18:59:17 +02:00
|
|
|
|
2014-10-29 22:11:58 +01:00
|
|
|
|
|
|
|
ifeq ($(IS_64),1)
|
2014-07-16 18:59:17 +02:00
|
|
|
#check if AES-NI is supported by CPU
|
2014-08-17 07:35:09 +02:00
|
|
|
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
|
2014-09-13 20:36:36 +02:00
|
|
|
CPU_FLAGS = -maes -DAESNI
|
2014-07-16 18:59:17 +02:00
|
|
|
endif
|
2014-10-29 22:11:58 +01:00
|
|
|
endif
|
2014-07-16 18:59:17 +02:00
|
|
|
|