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
|
2018-09-04 07:39:46 +00:00
|
|
|
SSLROOT = ${BREWROOT}/opt/openssl@1.1
|
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)
|
2020-11-14 22:31:20 +00:00
|
|
|
CXXFLAGS += -D__AES__ -maes
|
2018-02-19 15:16:48 +00:00
|
|
|
endif
|
|
|
|
|
2018-09-04 07:51:44 +00:00
|
|
|
install: all
|
2018-09-04 07:39:46 +00:00
|
|
|
install -d ${PREFIX}/bin ${PREFIX}/etc/i2pd ${PREFIX}/share/doc/i2pd ${PREFIX}/share/i2pd ${PREFIX}/share/man/man1 ${PREFIX}/var/lib/i2pd
|
|
|
|
install -m 755 ${I2PD} ${PREFIX}/bin/
|
|
|
|
install -m 644 contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/etc/i2pd
|
|
|
|
@cp -R contrib/certificates ${PREFIX}/share/i2pd/
|
|
|
|
install -m 644 ChangeLog LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/share/doc/i2pd
|
|
|
|
@gzip debian/i2pd.1 && install debian/i2pd.1.gz ${PREFIX}/share/man/man1
|
|
|
|
@ln -sf ${PREFIX}/share/i2pd/certificates ${PREFIX}/var/lib/i2pd/
|
|
|
|
@ln -sf ${PREFIX}/etc/i2pd/i2pd.conf ${PREFIX}/var/lib/i2pd/i2pd.conf
|
|
|
|
@ln -sf ${PREFIX}/etc/i2pd/subscriptions.txt ${PREFIX}/var/lib/i2pd/subscriptions.txt
|
2020-11-14 22:31:20 +00:00
|
|
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf ${PREFIX}/var/lib/i2pd/tunnels.conf
|