From b82bd46cec19b33ad1c06788f92bd4459b216519 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 17 Nov 2017 11:07:51 +0300 Subject: [PATCH] testing g++ build [3] --- .travis.yml | 6 +++--- Makefile.homebrew | 17 ++++++++++------- Makefile.osx | 4 +--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index effa0157..a06611a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,11 +31,11 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libressl miniupnpc && brew upgrade boost ; fi env: matrix: - - BUILD_TYPE=Release UPNP=ON - - BUILD_TYPE=Release UPNP=OFF + - BUILD_TYPE=Release UPNP=ON OSX_UPNP=yes + - BUILD_TYPE=Release UPNP=OFF OSX_UPNP=no exclude: - os: osx compiler: g++ script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd build && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_UPNP=${UPNP} && make ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make HOMEBREW=1 USE_UPNP=${UPNP} ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make HOMEBREW=1 USE_UPNP=${OSX_UPNP} ; fi diff --git a/Makefile.homebrew b/Makefile.homebrew index 4f69ae36..e6acc51d 100644 --- a/Makefile.homebrew +++ b/Makefile.homebrew @@ -3,10 +3,13 @@ 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 -Wno-overloaded-virtual INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include +ifndef TRAVIS_OS_NAME + CXX = clang++ +endif + 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 @@ -15,15 +18,15 @@ LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem endif ifeq ($(USE_UPNP),yes) - LDFLAGS += -ldl - CXXFLAGS += -DUSE_UPNP + LDFLAGS += -ldl + CXXFLAGS += -DUSE_UPNP INCFLAGS += -I${UPNPROOT}/include ifeq ($(USE_STATIC),yes) LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a else LDFLAGS += -L${UPNPROOT}/lib LDLIBS += -lminiupnpc - endif + endif endif # OSX Notes @@ -32,11 +35,11 @@ endif # Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic # note from psi: 2009 macbook does not have aesni #ifeq ($(USE_AESNI),yes) -# CXXFLAGS += -maes -DAESNI +# CXXFLAGS += -maes -DAESNI #endif # Disabled, since it will be the default make rule. I think its better # to define the default rule in Makefile and not Makefile. - torkel #install: all -# test -d ${PREFIX} || mkdir -p ${PREFIX}/ -# cp -r i2p ${PREFIX}/ +# test -d ${PREFIX} || mkdir -p ${PREFIX}/ +# cp -r i2p ${PREFIX}/ diff --git a/Makefile.osx b/Makefile.osx index 22274dc0..8d6a1c65 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -1,6 +1,4 @@ -ifndef TRAVIS_OS_NAME - CXX = clang++ -endif +CXX = clang++ CXXFLAGS = -Os -Wall -std=c++11 -DMAC_OSX #CXXFLAGS = -g -O2 -Wall -std=c++11 INCFLAGS = -I/usr/local/include