2016-05-04 16:12:24 +00:00
|
|
|
# root directory holding homebrew
|
2017-09-11 11:48:10 +00:00
|
|
|
BREWROOT = /usr/local
|
2016-05-04 16:12:24 +00:00
|
|
|
BOOSTROOT = ${BREWROOT}/opt/boost
|
|
|
|
SSLROOT = ${BREWROOT}/opt/libressl
|
2017-09-11 11:48:10 +00:00
|
|
|
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
2018-06-28 23:27:19 +00:00
|
|
|
CXXFLAGS = ${CXX_DEBUG} -Wall -std=c++11 -DMAC_OSX -Wno-overloaded-virtual
|
2018-01-06 03:48:51 +00:00
|
|
|
INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include
|
2018-06-28 23:27:19 +00:00
|
|
|
LDFLAGS = ${LD_DEBUG}
|
2017-09-11 11:48:10 +00:00
|
|
|
|
2017-11-17 17:43:00 +00:00
|
|
|
ifndef TRAVIS
|
|
|
|
CXX = clang++
|
|
|
|
endif
|
|
|
|
|
2017-09-11 11:48:10 +00:00
|
|
|
ifeq ($(USE_STATIC),yes)
|
2017-11-17 17:43:00 +00:00
|
|
|
LDLIBS = -lz ${SSLROOT}/lib/libcrypto.a ${SSLROOT}/lib/libssl.a ${BOOSTROOT}/lib/libboost_system.a ${BOOSTROOT}/lib/libboost_date_time.a ${BOOSTROOT}/lib/libboost_filesystem.a ${BOOSTROOT}/lib/libboost_program_options.a -lpthread
|
2017-09-11 11:48:10 +00:00
|
|
|
else
|
2018-06-28 23:27:19 +00:00
|
|
|
LDFLAGS += -L${SSLROOT}/lib -L${BOOSTROOT}/lib
|
2017-11-17 17:43:00 +00:00
|
|
|
LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
2017-09-11 11:48:10 +00:00
|
|
|
endif
|
2016-05-04 16:12:24 +00:00
|
|
|
|
2016-06-27 13:00:00 +00:00
|
|
|
ifeq ($(USE_UPNP),yes)
|
2017-04-22 01:17:01 +00:00
|
|
|
LDFLAGS += -ldl
|
|
|
|
CXXFLAGS += -DUSE_UPNP
|
2017-11-17 17:43:00 +00:00
|
|
|
INCFLAGS += -I${UPNPROOT}/include
|
|
|
|
ifeq ($(USE_STATIC),yes)
|
|
|
|
LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a
|
|
|
|
else
|
|
|
|
LDFLAGS += -L${UPNPROOT}/lib
|
|
|
|
LDLIBS += -lminiupnpc
|
|
|
|
endif
|
2016-05-04 16:12:24 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# OSX Notes
|
|
|
|
# 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
|
|
|
|
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
|
2018-02-19 15:16:48 +00:00
|
|
|
ifeq ($(USE_AESNI),yes)
|
2018-06-28 23:30:03 +00:00
|
|
|
CXXFLAGS += -maes
|
2018-02-19 15:16:48 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(USE_AVX),1)
|
|
|
|
CXXFLAGS += -mavx
|
|
|
|
endif
|
|
|
|
|
2016-05-04 16:12:24 +00:00
|
|
|
|
|
|
|
# Disabled, since it will be the default make rule. I think its better
|
|
|
|
# to define the default rule in Makefile and not Makefile.<ostype> - torkel
|
|
|
|
#install: all
|
|
|
|
# test -d ${PREFIX} || mkdir -p ${PREFIX}/
|
|
|
|
# cp -r i2p ${PREFIX}/
|