Skip to content

Commit

Permalink
Build: add/refactor targets in Makefile
Browse files Browse the repository at this point in the history
* Add optimized-hardening target
* Remove tests + doxygen from all-options target
* Amend Travis-CI and building documentation
  • Loading branch information
anonimal committed Jul 25, 2016
1 parent 038547b commit 88177fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ before_install:
- sudo apt-get -y install libboost-{chrono,log,program-options,date-time,thread,system,filesystem,regex,test}1.58{-dev,.0}
before_script: export CC=gcc-${GCC_VERSION} CXX=g++-${GCC_VERSION} ${FORCE_CLEAN}
#script: if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make clean && make -j2 dependencies && make -j2 all-options && make install-resources; fi
script: make clean && make -j2 dependencies && make -j2 all-options && make install-resources
script: make clean && make -j2 dependencies && make -j2 all-options && make -j2 tests && make doxygen && make install-resources
notifications:
email: false
irc:
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,19 @@ static:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-static) ../ && $(MAKE)

# We need (or very much should have) optimizations with hardening
optimized-hardening:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-optimize) $(cmake-hardening) ../ && $(MAKE)

upnp:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-upnp) ../ && $(MAKE)

all-options:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-optimize) $(cmake-hardening) $(cmake-upnp) ../ && $(MAKE)

tests:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-tests) $(cmake-benchmarks) ../ && $(MAKE)
Expand All @@ -105,11 +114,6 @@ doxygen:
mkdir -p $(build)
cd $(build) && $(cmake) -D WITH_CPPNETLIB=OFF $(cmake-doxygen) ../ && $(MAKE) doc

# We need (or very much should have) optimizations with cmake-hardening
all-options:
mkdir -p $(build)
cd $(build) && $(cmake) $(cmake-debug) $(cmake-optimize) $(cmake-hardening) $(cmake-upnp) $(cmake-tests) $(cmake-benchmarks) $(cmake-doxygen) ../ && $(MAKE)

help:
mkdir -p $(build)
cd $(build) && $(cmake) -D WITH_CPPNETLIB=OFF -LH ../
Expand Down
4 changes: 3 additions & 1 deletion doc/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ Other options:
- ```make static``` produces static binary

- ```make upnp``` produces vanilla binary with UPnP support (requires [MiniUPnP](http://miniupnp.free.fr/files/))
- ```make optimized-hardening``` produces optimized, hardened binary
- ```make all-options``` produces optimized, hardened, UPnP enabled binary

- ```make tests``` produces all unit-tests and benchmarks
- ```make doxygen``` produces Doxygen documentation (output will be in doc/Doxygen)
- ```make all-options``` produces optimized, hardened, UPnP enabled binary + unit-tests and benchmarks + Doxygen

- ```make help``` shows available CMake build options
- ```make clean``` between subsequent builds
Expand Down

0 comments on commit 88177fa

Please sign in to comment.