i2pd/Makefile.linux
Kill Your TV 25b5068f5e allow LDFLAGS to be set by user
Move old LDFLAGS variable to LDLIBS. By doing ths, a user can set their
own LDFLAGS without breaking the build. A case in which this can be
useful is hardening with debian, e.g.

    $ dpkg-buildflags --get LDFLAGS
    -Wl,-z,relro
2014-11-04 02:37:12 +00:00

33 lines
849 B
Makefile

CXXFLAGS = -g -Wall
CXXVER := $(shell $(CXX) -dumpversion)
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
else ifeq ($(shell expr match $(CXX) 'clang'),5)
NEEDED_CXXFLAGS += -std=c++11
else # not supported
$(error Compiler too old)
endif
include filelist.mk
INCFLAGS =
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
LIBS =
ifeq ($(IS_64),1)
#check if AES-NI is supported by CPU
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
CPU_FLAGS = -maes -DAESNI
endif
endif