2019-02-07 02:14:00 +01:00
|
|
|
# Copyright (c) 2018, The Loki Project
|
2019-04-12 06:38:30 +02:00
|
|
|
# Copyright (c) 2014-2019, The Monero Project
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# All rights reserved.
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# Redistribution and use in source and binary forms, with or without modification, are
|
|
|
|
# permitted provided that the following conditions are met:
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
|
|
# conditions and the following disclaimer.
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
|
|
# of conditions and the following disclaimer in the documentation and/or other
|
|
|
|
# materials provided with the distribution.
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software without specific
|
|
|
|
# prior written permission.
|
2016-08-29 12:13:55 +02:00
|
|
|
#
|
2015-05-31 13:40:18 +02:00
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
|
|
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
|
|
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2018-08-22 01:25:14 +02:00
|
|
|
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
|
|
|
|
2018-10-24 16:43:31 +02:00
|
|
|
dotgit=$(shell ls -d .git/config)
|
|
|
|
ifneq ($(dotgit), .git/config)
|
|
|
|
USE_SINGLE_BUILDDIR=1
|
|
|
|
endif
|
|
|
|
|
2018-08-20 17:24:26 +02:00
|
|
|
subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`)
|
|
|
|
ifeq ($(USE_SINGLE_BUILDDIR),)
|
|
|
|
builddir := build/"$(subbuilddir)"
|
|
|
|
topdir := ../../../..
|
|
|
|
deldirs := $(builddir)
|
|
|
|
else
|
|
|
|
builddir := build
|
|
|
|
topdir := ../..
|
|
|
|
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
|
|
|
endif
|
|
|
|
|
2015-01-27 08:43:15 +01:00
|
|
|
all: release-all
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2018-10-16 03:39:17 +02:00
|
|
|
depends:
|
|
|
|
cd contrib/depends && $(MAKE) HOST=$(target) && cd ../.. && mkdir -p build/$(target)/release
|
|
|
|
cd build/$(target)/release && cmake -DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/contrib/depends/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
|
|
|
|
2014-03-03 23:07:58 +01:00
|
|
|
cmake-debug:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D CMAKE_BUILD_TYPE=Debug $(topdir)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2015-01-27 08:43:15 +01:00
|
|
|
debug: cmake-debug
|
2018-08-20 17:24:26 +02:00
|
|
|
cd $(builddir)/debug && $(MAKE)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2017-10-09 01:06:37 +02:00
|
|
|
# Temporarily disable some tests:
|
|
|
|
# * libwallet_api_tests fail (Issue #895)
|
2016-08-23 01:43:43 +02:00
|
|
|
debug-test:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE) && $(MAKE) ARGS="-E libwallet_api_tests" test
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2019-02-05 05:13:36 +01:00
|
|
|
integration:
|
|
|
|
mkdir -p $(builddir)/integration
|
|
|
|
cd $(builddir)/integration && cmake -D CMAKE_BUILD_TYPE=Debug -D BUILD_INTEGRATION=ON $(topdir) && $(MAKE)
|
|
|
|
|
2019-09-03 12:27:22 +02:00
|
|
|
debug-test-asan:
|
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D SANITIZE=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE) && $(MAKE) ARGS="-E libwallet_api_tests" test
|
|
|
|
|
2018-11-20 14:40:51 +01:00
|
|
|
debug-test-trezor:
|
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D TREZOR_DEBUG=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE) && $(MAKE) ARGS="-E libwallet_api_tests" test
|
|
|
|
|
2015-01-27 08:43:15 +01:00
|
|
|
debug-all:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
|
2017-07-02 10:12:10 +02:00
|
|
|
|
|
|
|
debug-static-all:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D STATIC=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2018-05-31 11:40:00 +02:00
|
|
|
debug-static-win64:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 $(topdir) && $(MAKE)
|
2018-05-31 11:40:00 +02:00
|
|
|
|
|
|
|
debug-static-win32:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x32" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys32 $(topdir) && $(MAKE)
|
2018-05-31 11:40:00 +02:00
|
|
|
|
2014-03-03 23:07:58 +01:00
|
|
|
cmake-release:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D CMAKE_BUILD_TYPE=Release -D WARNINGS_AS_ERRORS=ON $(topdir)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2015-01-27 08:43:15 +01:00
|
|
|
release: cmake-release
|
2018-08-20 17:24:26 +02:00
|
|
|
cd $(builddir)/release && $(MAKE)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2016-08-26 21:50:03 +02:00
|
|
|
release-test:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE) && $(MAKE) test
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2015-01-27 08:43:15 +01:00
|
|
|
release-all:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2017-02-18 17:30:29 +01:00
|
|
|
|
2016-08-29 20:23:57 +02:00
|
|
|
coverage:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/debug
|
|
|
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -D COVERAGE=ON $(topdir) && $(MAKE) && $(MAKE) test
|
2016-08-29 20:23:57 +02:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
# Targets for specific prebuilt builds which will be advertised for updates by their build tag
|
|
|
|
|
|
|
|
release-static-linux-armv6:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv6" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2016-08-28 07:44:33 +02:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static-linux-armv7:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv7" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2016-08-29 12:13:55 +02:00
|
|
|
|
2018-10-07 19:05:13 +02:00
|
|
|
release-static-android-armv7:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release/translations
|
|
|
|
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE=ON -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" -D WARNINGS_AS_ERRORS=ON ../.. && $(MAKE)
|
2018-10-07 19:05:13 +02:00
|
|
|
|
|
|
|
release-static-android-armv8:
|
|
|
|
mkdir -p $(builddir)/release/translations
|
|
|
|
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" -D WARNINGS_AS_ERRORS=ON ../.. && $(MAKE)
|
2017-01-05 02:11:05 +01:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static-linux-armv8:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv8" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2016-08-29 12:13:55 +02:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static-linux-x86_64:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x64" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2015-04-06 13:05:30 +02:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static-freebsd-x86_64:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="freebsd-x64" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2017-02-18 17:30:29 +01:00
|
|
|
|
2017-02-21 11:25:58 +01:00
|
|
|
release-static-mac-x86_64:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2015-04-06 13:05:30 +02:00
|
|
|
|
2017-02-18 17:30:29 +01:00
|
|
|
release-static-linux-i686:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x86" -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2015-04-06 13:05:30 +02:00
|
|
|
|
|
|
|
release-static-win64:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2015-04-06 13:05:30 +02:00
|
|
|
|
|
|
|
release-static-win32:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/release
|
2019-11-21 00:04:21 +01:00
|
|
|
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x32" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys32 -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE)
|
2014-09-15 08:13:26 +02:00
|
|
|
|
Add fuzz testing using american fuzzy lop
Existing tests: block, transaction, signature, cold outputs,
cold transaction.
Data for these is in tests/data/fuzz.
A convenience shell script is in contrib/fuzz_testing/fuzz.sh, eg:
contrib/fuzz_testing/fuzz.sh signature
The fuzzer will run indefinitely, ^C to stop.
Fuzzing is currently supported for GCC only. I can't get CLANG
to build Monero here as it dies on some system headers, so if
someone wants to make it work on both, that'd be great.
In particular, the __AFL_LOOP construct should be made to work
so that a given run can fuzz multiple inputs, as the C++ load
time is substantial.
2017-06-24 13:38:41 +02:00
|
|
|
fuzz:
|
2018-08-20 17:24:26 +02:00
|
|
|
mkdir -p $(builddir)/fuzz
|
|
|
|
cd $(builddir)/fuzz && cmake -D STATIC=ON -D SANITIZE=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D CMAKE_C_COMPILER=afl-gcc -D CMAKE_CXX_COMPILER=afl-g++ -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=fuzz -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)
|
Add fuzz testing using american fuzzy lop
Existing tests: block, transaction, signature, cold outputs,
cold transaction.
Data for these is in tests/data/fuzz.
A convenience shell script is in contrib/fuzz_testing/fuzz.sh, eg:
contrib/fuzz_testing/fuzz.sh signature
The fuzzer will run indefinitely, ^C to stop.
Fuzzing is currently supported for GCC only. I can't get CLANG
to build Monero here as it dies on some system headers, so if
someone wants to make it work on both, that'd be great.
In particular, the __AFL_LOOP construct should be made to work
so that a given run can fuzz multiple inputs, as the C++ load
time is substantial.
2017-06-24 13:38:41 +02:00
|
|
|
|
2014-03-03 23:07:58 +01:00
|
|
|
clean:
|
2018-08-20 17:24:26 +02:00
|
|
|
@echo "WARNING: Back-up your wallet if it exists within ./"$(deldirs)"!" ; \
|
|
|
|
read -r -p "This will destroy the build directory, continue (y/N)?: " CONTINUE; \
|
|
|
|
[ $$CONTINUE = "y" ] || [ $$CONTINUE = "Y" ] || (echo "Exiting."; exit 1;)
|
|
|
|
rm -rf $(deldirs)
|
|
|
|
|
|
|
|
clean-all:
|
2014-04-30 19:07:00 +02:00
|
|
|
@echo "WARNING: Back-up your wallet if it exists within ./build!" ; \
|
2018-08-20 17:24:26 +02:00
|
|
|
read -r -p "This will destroy all build directories, continue (y/N)?: " CONTINUE; \
|
2014-04-30 19:07:00 +02:00
|
|
|
[ $$CONTINUE = "y" ] || [ $$CONTINUE = "Y" ] || (echo "Exiting."; exit 1;)
|
2018-08-20 17:24:26 +02:00
|
|
|
rm -rf ./build
|
2014-03-03 23:07:58 +01:00
|
|
|
|
|
|
|
tags:
|
2018-08-10 06:15:47 +02:00
|
|
|
ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest tests
|
2014-03-03 23:07:58 +01:00
|
|
|
|
2019-02-07 02:14:00 +01:00
|
|
|
# Debug Target for Developers: Only build daemon and wallet
|
2019-09-16 05:04:03 +02:00
|
|
|
developer-daemon-and-wallet:
|
2019-02-07 02:14:00 +01:00
|
|
|
mkdir -p $(builddir)/debug
|
cmake modernization
The archaic (i.e. decade old) cmake usage here really got in the way of
trying to properly use newer libraries (like lokimq), so this undertakes
overhauling it considerably to make it much more sane (and significantly
reduce the size).
I left more of the architecture-specific bits in the top-level
CMakeLists.txt intact; most of the efforts here are about properly
loading dependencies, specifying dependencies and avoiding a whole pile
of cmake antipatterns.
This bumps the required cmake version to 3.5, which is what xenial comes
with.
- extensive use of interface libraries to include libraries,
definitions, and include paths
- use Boost::whatever instead of ${Boost_WHATEVER_LIBRARY}. The
interface targets are (again) much better as they also give you any
needed include or linking flags without needing to worry about them.
- don't list header files when building things. This has *never* been
correct cmake usage (cmake has always known how to wallet_rpc_headers
the headers that .cpp files include to know about build changes).
- remove the loki_add_library monstrosity; it breaks target names and
makes compiling less efficient because the author couldn't figure out
how to link things together.
- make loki_add_executable take the output filename, and set the output
path to bin/ and install to bin because *every single usage* of
loki_add_executable was immediately followed by setting the output
filename and setting the output path to bin/ and installing to bin.
- move a bunch of crap that is only used in one particular
src/whatever/CMakeLists.txt into that particular CMakeLists.txt instead
of the top level CMakeLists.txt (or src/CMakeLists.txt).
- Remove a bunch of redundant dependencies; most of them look like they
were just copy-and-pasted in, and many more aren't needed (since they
are implied by the PUBLIC linking of other dependencies).
- Removed `die` since it just does a FATAL_ERROR, but adds color (which
is useless since CMake already makes FATAL_ERRORs perfectly visible).
- Change the way LOKI_DAEMON_AND_WALLET_ONLY works to just change the
make targets to daemon and simplewallet rather than changing the build
process (this should make it faster, too, since there are various other
things that will be excluded).
2020-03-03 04:57:08 +01:00
|
|
|
cd $(builddir)/debug && cmake -D CMAKE_BUILD_TYPE=Debug -D BUILD_TESTS=OFF -D WARNINGS_AS_ERRORS=ON $(topdir) && $(MAKE) daemon simplewallet
|
2019-02-07 02:14:00 +01:00
|
|
|
|
|
|
|
.PHONY: all cmake-debug debug debug-test debug-all cmake-release release release-test release-all clean tags developer_daemon_and_wallet
|