Makefile: cleanup

This commit is contained in:
tobtoht 2021-07-14 15:37:53 +02:00
parent 56c57a8c23
commit b16bf440f6
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -3,42 +3,49 @@
CMAKEFLAGS = \
-DARCH=x86_64 \
-DBUILD_64=On \
-DBUILD_TESTS=Off \
-DLOCALMONERO=On \
-DXMRIG=On \
-DCHECK_UPDATES=Off \
-DTOR_BIN=Off \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_VERBOSE_MAKEFILE=On \
-DMANUAL_SUBMODULES=1 \
-DSTATIC=On \
-DUSE_DEVICE_TREZOR=On \
$(CMAKEFLAGS_EXTRA)
-DTOR_BIN=$(or ${TOR_BIN}, Off) \
-DTOR_VERSION=$(or ${TOR_VERSION}, Off) \
-DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off) \
-DWITH_SCANNER=$(or ${WITH_SCANNER}, Off) \
-DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH}, Off)
release:
mkdir -p build/release && \
cd build/release && \
cmake -D CMAKE_BUILD_TYPE=Release $(CMAKEFLAGS) ../.. && \
$(MAKE)
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN}, Off)
release-static: CMAKEFLAGS += -DTOR_VERSION=$(or ${TOR_VERSION}, Off)
release-static: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
release-static: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, Off)
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH}, Off)
release-static:
cmake -Bbuild $(CMAKEFLAGS)
$(MAKE) -Cbuild
mkdir -p build/release && \
cd build/release && \
cmake \
-D BUILD_TAG="linux-x64" \
-D CMAKE_BUILD_TYPE=Release \
-D STATIC=On \
$(CMAKEFLAGS) \
../.. && \
$(MAKE)
depends:
mkdir -p build/$(target)/release
cd build/$(target)/release && cmake -D STATIC=ON -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DTOR_BIN=$(or ${TOR_BIN},OFF) -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, OFF) -DWITH_SCANNER=$(or ${WITH_SCANNER}, Off) -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)
mkdir -p build/$(target)/release && \
cd build/$(target)/release && \
cmake \
-D BUILD_TAG=$(tag) \
-D CMAKE_BUILD_TYPE=Release \
-D STATIC=ON \
-D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake \
$(CMAKEFLAGS) \
../../.. && \
$(MAKE)
mac-release: CMAKEFLAGS += -DSTATIC=Off
mac-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN}, Off)
mac-release: CMAKEFLAGS += -DTOR_VERSION=$(or ${TOR_VERSION}, Off)
mac-release: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
mac-release: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, On)
mac-release: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
mac-release: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
mac-release:
cmake -Bbuild $(CMAKEFLAGS)
$(MAKE) -Cbuild
$(MAKE) -Cbuild deploy
mkdir -p build && \
cd build && \
cmake \
-D BUILD_TAG="mac-x64" \
-D CMAKE_BUILD_TYPE=Release \
-D STATIC=Off \
$(CMAKEFLAGS) \
.. && \
$(MAKE) && \
$(MAKE) deploy