From d59d36f93cc8ec0c9be0aafc8dace91d963235a3 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 11 Sep 2017 07:48:10 -0400 Subject: [PATCH 1/2] fix up homebrew makefile --- Makefile.homebrew | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile.homebrew b/Makefile.homebrew index 1cce3232..4f69ae36 100644 --- a/Makefile.homebrew +++ b/Makefile.homebrew @@ -1,17 +1,29 @@ # root directory holding homebrew -BREWROOT = /usr/local/ +BREWROOT = /usr/local BOOSTROOT = ${BREWROOT}/opt/boost SSLROOT = ${BREWROOT}/opt/libressl +UPNPROOT = ${BREWROOT}/opt/miniupnpc CXX = clang++ -CXXFLAGS = -g -Wall -std=c++11 -DMAC_OSX -INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include +CXXFLAGS = -g -Wall -std=c++11 -DMAC_OSX -Wno-overloaded-virtual +INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include + +ifeq ($(USE_STATIC),yes) +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 +else LDFLAGS = -L${SSLROOT}/lib -L${BOOSTROOT}/lib LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread +endif ifeq ($(USE_UPNP),yes) LDFLAGS += -ldl CXXFLAGS += -DUSE_UPNP - LDLIBS += -lminiupnpc + INCFLAGS += -I${UPNPROOT}/include + ifeq ($(USE_STATIC),yes) + LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a + else + LDFLAGS += -L${UPNPROOT}/lib + LDLIBS += -lminiupnpc + endif endif # OSX Notes From 330fab2efa49205709f6a0523eeac514fd24c39c Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 11 Sep 2017 08:57:43 -0400 Subject: [PATCH 2/2] update macos i2pd qt build to statically compile in libraries for portability --- qt/i2pd_qt/i2pd_qt.pro | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/qt/i2pd_qt/i2pd_qt.pro b/qt/i2pd_qt/i2pd_qt.pro index 4fd1d38f..78078904 100644 --- a/qt/i2pd_qt/i2pd_qt.pro +++ b/qt/i2pd_qt/i2pd_qt.pro @@ -189,6 +189,24 @@ FORMS += mainwindow.ui \ LIBS += -lz +macx { + message("using mac os x target") + BREWROOT=/usr/local + BOOSTROOT=$$BREWROOT/opt/boost + SSLROOT=$$BREWROOT/opt/libressl + UPNPROOT=$$BREWROOT/opt/miniupnpc + INCLUDEPATH += $$BOOSTROOT/include + INCLUDEPATH += $$SSLROOT/include + INCLUDEPATH += $$UPNPROOT/include + LIBS += $$SSLROOT/lib/libcrypto.a + LIBS += $$SSLROOT/lib/libssl.a + LIBS += $$BOOSTROOT/lib/libboost_system.a + LIBS += $$BOOSTROOT/lib/libboost_date_time.a + LIBS += $$BOOSTROOT/lib/libboost_filesystem.a + LIBS += $$BOOSTROOT/lib/libboost_program_options.a + LIBS += $$UPNPROOT/lib/libminiupnpc.a +} + android { message("Using Android settings") DEFINES += ANDROID=1