i2pd/Makefile.linux

33 lines
849 B
Makefile
Raw Normal View History

2014-10-30 00:54:47 +03:00
CXXFLAGS = -g -Wall
CXXVER := $(shell $(CXX) -dumpversion)
2014-09-23 05:44:09 +04:00
2014-10-30 00:11:58 +03:00
FGREP = fgrep
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
NEEDED_CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
NEEDED_CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
NEEDED_CXXFLAGS += -std=c++0x
2014-10-30 04:42:55 +03:00
else ifeq ($(shell expr match $(CXX) 'clang'),5)
NEEDED_CXXFLAGS += -std=c++11
else # not supported
$(error Compiler too old)
2014-09-23 05:44:09 +04:00
endif
include filelist.mk
2014-08-17 09:35:09 +04:00
INCFLAGS =
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
2014-08-17 09:35:09 +04:00
LIBS =
2014-10-30 00:11:58 +03:00
ifeq ($(IS_64),1)
#check if AES-NI is supported by CPU
2014-08-17 09:35:09 +04:00
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
2014-09-13 22:36:36 +04:00
CPU_FLAGS = -maes -DAESNI
endif
2014-10-30 00:11:58 +03:00
endif