mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:54:01 +01:00
check for 64-bit compiler
This commit is contained in:
parent
6320572917
commit
524b2e9f8a
|
@ -2,6 +2,9 @@ CC = g++
|
||||||
CFLAGS = -g -Wall
|
CFLAGS = -g -Wall
|
||||||
CXXVER := $(shell ${CC} -dumpversion)
|
CXXVER := $(shell ${CC} -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
|
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
|
||||||
CFLAGS += -std=c++11
|
CFLAGS += -std=c++11
|
||||||
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
||||||
|
@ -18,8 +21,11 @@ INCFLAGS =
|
||||||
LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(IS_64),1)
|
||||||
#check if AES-NI is supported by CPU
|
#check if AES-NI is supported by CPU
|
||||||
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
|
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
|
||||||
CPU_FLAGS = -maes -DAESNI
|
CPU_FLAGS = -maes -DAESNI
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue