2016-05-04 19:12:24 +03:00
|
|
|
# root directory holding homebrew
|
2024-04-27 16:36:47 +03:00
|
|
|
BREWROOT = /opt/homebrew
|
2016-05-04 19:12:24 +03:00
|
|
|
BOOSTROOT = ${BREWROOT}/opt/boost
|
2018-09-04 10:39:46 +03:00
|
|
|
SSLROOT = ${BREWROOT}/opt/openssl@1.1
|
2017-09-11 14:48:10 +03:00
|
|
|
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
|
|
|
|
2024-04-27 16:36:47 +03:00
|
|
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wno-overloaded-virtual
|
2024-09-01 22:23:14 +03:00
|
|
|
NEEDED_CXXFLAGS ?= -std=c++17
|
2024-04-27 16:36:47 +03:00
|
|
|
INCFLAGS ?= -I${SSLROOT}/include -I${BOOSTROOT}/include
|
|
|
|
LDFLAGS ?= ${LD_DEBUG}
|
|
|
|
DEFINES += -DMAC_OSX
|
2017-11-17 20:43:00 +03:00
|
|
|
|
2017-09-11 14:48:10 +03:00
|
|
|
ifeq ($(USE_STATIC),yes)
|
2024-08-26 03:18:55 +03:00
|
|
|
LDLIBS = -lz ${SSLROOT}/lib/libcrypto.a ${SSLROOT}/lib/libssl.a ${BOOSTROOT}/lib/libboost_system.a ${BOOSTROOT}/lib/libboost_filesystem.a ${BOOSTROOT}/lib/libboost_program_options.a
|
2024-04-27 16:36:47 +03:00
|
|
|
ifeq ($(USE_UPNP),yes)
|
|
|
|
LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a
|
|
|
|
endif
|
|
|
|
LDLIBS += -lpthread -ldl
|
2017-09-11 14:48:10 +03:00
|
|
|
else
|
2018-06-29 02:27:19 +03:00
|
|
|
LDFLAGS += -L${SSLROOT}/lib -L${BOOSTROOT}/lib
|
2024-08-26 03:18:55 +03:00
|
|
|
LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_filesystem -lboost_program_options -lpthread
|
2024-04-27 16:36:47 +03:00
|
|
|
ifeq ($(USE_UPNP),yes)
|
|
|
|
LDFLAGS += -L${UPNPROOT}/lib
|
|
|
|
LDLIBS += -lminiupnpc
|
|
|
|
endif
|
2017-09-11 14:48:10 +03:00
|
|
|
endif
|
2016-05-04 19:12:24 +03:00
|
|
|
|
2016-06-27 16:00:00 +03:00
|
|
|
ifeq ($(USE_UPNP),yes)
|
2024-04-27 16:36:47 +03:00
|
|
|
DEFINES += -DUSE_UPNP
|
2017-11-17 20:43:00 +03:00
|
|
|
INCFLAGS += -I${UPNPROOT}/include
|
2016-05-04 19:12:24 +03:00
|
|
|
endif
|
|
|
|
|
2018-02-19 18:16:48 +03:00
|
|
|
ifeq ($(USE_AESNI),yes)
|
2024-04-27 16:36:47 +03:00
|
|
|
ifneq (, $(findstring i386, $(SYS))$(findstring i686, $(SYS))$(findstring x86_64, $(SYS))) # only x86-based CPU supports that
|
|
|
|
NEEDED_CXXFLAGS += -maes
|
|
|
|
DEFINES += -D__AES__
|
|
|
|
endif
|
2018-02-19 18:16:48 +03:00
|
|
|
endif
|
|
|
|
|
2018-09-04 10:51:44 +03:00
|
|
|
install: all
|
2022-06-23 19:55:08 +03:00
|
|
|
install -d ${PREFIX}/bin
|
|
|
|
install -m 755 ${I2PD} ${PREFIX}/bin
|
|
|
|
install -d ${PREFIX}/etc ${PREFIX}/etc/i2pd ${PREFIX}/etc/i2pd/tunnels.conf.d
|
2018-09-04 10:39:46 +03:00
|
|
|
install -m 644 contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/etc/i2pd
|
2022-06-23 19:55:08 +03:00
|
|
|
install -d ${PREFIX}/share ${PREFIX}/share/doc ${PREFIX}/share/doc/i2pd
|
2018-09-04 10:39:46 +03:00
|
|
|
install -m 644 ChangeLog LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/share/doc/i2pd
|
2022-06-23 19:55:08 +03:00
|
|
|
install -d ${PREFIX}/share/i2pd
|
|
|
|
@cp -R contrib/certificates ${PREFIX}/share/i2pd/
|
|
|
|
install -d ${PREFIX}/share/man ${PREFIX}/share/man/man1
|
2021-10-19 05:29:30 +03:00
|
|
|
@gzip -kf debian/i2pd.1 && install debian/i2pd.1.gz ${PREFIX}/share/man/man1
|
2022-06-23 19:55:08 +03:00
|
|
|
install -d ${PREFIX}/var ${PREFIX}/var/lib ${PREFIX}/var/lib/i2pd
|
|
|
|
@ln -sf ${PREFIX}/share/i2pd/certificates ${PREFIX}/var/lib/i2pd/certificates
|
2022-03-22 16:24:19 +03:00
|
|
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf.d ${PREFIX}/var/lib/i2pd/tunnels.d
|
2018-09-04 10:39:46 +03:00
|
|
|
@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-15 01:31:20 +03:00
|
|
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf ${PREFIX}/var/lib/i2pd/tunnels.conf
|