mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
* move USE_* to main Makefile
This commit is contained in:
parent
56c404e6c1
commit
05a62af99b
3
Makefile
3
Makefile
|
@ -4,6 +4,9 @@ I2PD := i2p
|
||||||
|
|
||||||
include filelist.mk
|
include filelist.mk
|
||||||
|
|
||||||
|
USE_AESNI := yes
|
||||||
|
USE_STATIC := no
|
||||||
|
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
DAEMON_SRC += DaemonLinux.cpp
|
DAEMON_SRC += DaemonLinux.cpp
|
||||||
include Makefile.osx
|
include Makefile.osx
|
||||||
|
|
|
@ -15,8 +15,7 @@ else # not supported
|
||||||
$(error Compiler too old)
|
$(error Compiler too old)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USE_AESNI := yes
|
ifeq ($(USE_STATIC),yes)
|
||||||
ifeq ($(STATIC),yes)
|
|
||||||
LIBDIR := /usr/lib
|
LIBDIR := /usr/lib
|
||||||
LDLIBS = $(LIBDIR)/libcryptopp.a
|
LDLIBS = $(LIBDIR)/libcryptopp.a
|
||||||
LDLIBS += $(LIBDIR)/libboost_system.a
|
LDLIBS += $(LIBDIR)/libboost_system.a
|
||||||
|
@ -30,14 +29,15 @@ else
|
||||||
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FGREP = fgrep
|
GREP = fgrep
|
||||||
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
|
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -c "64")
|
||||||
ifeq ($(USE_AESNI),yes)
|
ifeq ($(USE_AESNI),yes)
|
||||||
ifeq ($(IS_64),1)
|
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),1)
|
||||||
CXXFLAGS += -maes -DAESNI
|
CXXFLAGS += -maes -DAESNI
|
||||||
|
else
|
||||||
|
$(warning "AESNI support enabled requested but not supported by this CPU")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,9 @@ LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_
|
||||||
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
|
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
|
||||||
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
|
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
|
||||||
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
|
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
|
||||||
CXXFLAGS += -maes -DAESNI
|
ifeq ($(USE_AESNI),yes)
|
||||||
|
CXXFLAGS += -maes -DAESNI
|
||||||
|
endif
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p ${PREFIX}/
|
mkdir -p ${PREFIX}/
|
||||||
|
|
Loading…
Reference in a new issue