2019-10-02 17:11:59 +02:00
|
|
|
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
|
|
|
|
|
|
|
dotgit=$(shell ls -d .git/config)
|
|
|
|
ifneq ($(dotgit), .git/config)
|
|
|
|
USE_SINGLE_BUILDDIR=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2018-05-09 02:01:27 +02:00
|
|
|
default:
|
2019-12-19 01:52:26 +01:00
|
|
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 02:01:27 +02:00
|
|
|
debug:
|
2019-12-19 01:52:26 +01:00
|
|
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) .. && $(MAKE) VERBOSE=1
|
2020-09-20 09:28:06 +02:00
|
|
|
|
|
|
|
depends:
|
|
|
|
mkdir -p build/$(target)/release
|
|
|
|
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
|
|
|
|
2018-05-09 02:01:27 +02:00
|
|
|
devmode:
|
2019-12-19 01:52:26 +01:00
|
|
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 02:01:27 +02:00
|
|
|
clean:
|
|
|
|
mkdir -p build && cd build && rm -rf *
|
|
|
|
scanner:
|
2019-12-19 01:52:26 +01:00
|
|
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 02:01:27 +02:00
|
|
|
|
2020-05-27 02:12:40 +02:00
|
|
|
release:
|
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
|
|
|
|
2020-06-21 02:08:37 +02:00
|
|
|
release-static:
|
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
|
|
|
|
2019-10-02 17:11:59 +02:00
|
|
|
debug-static-win64:
|
2020-04-06 19:22:34 +02:00
|
|
|
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},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=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
2019-10-02 22:33:48 +02:00
|
|
|
|
|
|
|
debug-static-mac64:
|
|
|
|
mkdir -p $(builddir)/debug
|
2019-12-19 01:52:26 +01:00
|
|
|
cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
2019-10-02 22:33:48 +02:00
|
|
|
|
2019-10-07 14:07:09 +02:00
|
|
|
release-static-win64:
|
2020-04-06 19:22:34 +02:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -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=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
2019-10-07 14:07:09 +02:00
|
|
|
|
2020-05-15 04:24:14 +02:00
|
|
|
release-win64:
|
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -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=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|