2019-10-02 18:11:59 +03:00
|
|
|
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
2020-10-30 05:04:55 +02:00
|
|
|
MANUAL_SUBMODULES ?= OFF
|
2019-10-02 18:11:59 +03:00
|
|
|
|
|
|
|
dotgit=$(shell ls -d .git/config)
|
2020-11-15 04:37:10 +02:00
|
|
|
ifeq ($(dotgit), .git/config)
|
|
|
|
ifeq ($(shell git --version > /dev/null 2>&1 ; echo $$?), 0)
|
|
|
|
git = yes
|
|
|
|
else
|
|
|
|
$(warning git command not found)
|
|
|
|
endif
|
2019-10-02 18:11:59 +03:00
|
|
|
endif
|
|
|
|
|
2020-11-15 04:44:16 +02:00
|
|
|
builddir := build
|
|
|
|
topdir := ../..
|
2020-09-26 03:15:58 +03:00
|
|
|
ifeq ($(USE_SINGLE_BUILDDIR), OFF)
|
2020-11-15 04:44:16 +02:00
|
|
|
os := $(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`)
|
|
|
|
builddir := $(builddir)/$(os)
|
|
|
|
topdir := $(topdir)/..
|
|
|
|
|
2020-11-15 04:37:10 +02:00
|
|
|
ifdef git
|
|
|
|
branch := $(shell git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g')
|
|
|
|
builddir := $(builddir)/$(branch)
|
|
|
|
topdir := $(topdir)/..
|
|
|
|
endif
|
2020-11-15 04:44:16 +02:00
|
|
|
|
|
|
|
deldirs := $(builddir)
|
2019-10-02 18:11:59 +03:00
|
|
|
else
|
2020-11-15 04:44:16 +02:00
|
|
|
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
2019-10-02 18:11:59 +03:00
|
|
|
endif
|
|
|
|
|
2018-05-09 03:01:27 +03:00
|
|
|
default:
|
2021-11-10 07:25:11 +02:00
|
|
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 03:01:27 +03:00
|
|
|
debug:
|
2021-04-22 19:54:25 +03:00
|
|
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && $(MAKE) VERBOSE=1
|
2020-09-20 10:28:06 +03:00
|
|
|
|
|
|
|
depends:
|
|
|
|
mkdir -p build/$(target)/release
|
2020-10-30 05:04:55 +02:00
|
|
|
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
2020-09-20 10:28:06 +03:00
|
|
|
|
2018-05-09 03:01:27 +03:00
|
|
|
devmode:
|
2021-11-10 07:25:11 +02:00
|
|
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 03:01:27 +03:00
|
|
|
clean:
|
|
|
|
mkdir -p build && cd build && rm -rf *
|
|
|
|
scanner:
|
2021-11-10 07:25:11 +02:00
|
|
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
2018-05-09 03:01:27 +03:00
|
|
|
|
2020-05-27 03:12:40 +03:00
|
|
|
release:
|
2021-11-10 07:25:11 +02:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
2020-05-27 03:12:40 +03:00
|
|
|
|
2020-10-14 18:51:29 +03:00
|
|
|
release-linux-armv8:
|
2021-08-31 22:50:56 +03:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
2020-10-14 18:51:29 +03:00
|
|
|
|
2021-03-21 04:59:21 +02:00
|
|
|
release-linux-ppc64le:
|
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="ppc64le" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
|
|
|
|
2020-06-21 03:08:37 +03:00
|
|
|
release-static:
|
2020-10-30 05:04:55 +02:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
2020-06-21 03:08:37 +03:00
|
|
|
|
2019-10-02 18:11:59 +03:00
|
|
|
debug-static-win64:
|
2020-10-30 05:04:55 +02:00
|
|
|
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -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 23:33:48 +03:00
|
|
|
|
|
|
|
debug-static-mac64:
|
|
|
|
mkdir -p $(builddir)/debug
|
2022-04-08 19:24:14 +03:00
|
|
|
cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
2019-10-02 23:33:48 +03:00
|
|
|
|
2019-10-07 15:07:09 +03:00
|
|
|
release-static-win64:
|
2020-10-30 05:04:55 +02:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -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 15:07:09 +03:00
|
|
|
|
2020-05-15 05:24:14 +03:00
|
|
|
release-win64:
|
2020-10-30 05:04:55 +02:00
|
|
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -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)
|