2022-12-23 17:48:15 +00:00
|
|
|
BUILD_ARCH := $(shell uname -m)
|
|
|
|
RELEASE_NAME := "dragonfly-${BUILD_ARCH}"
|
|
|
|
|
|
|
|
HELIO_RELEASE := $(if $(HELIO_RELEASE),y,)
|
2023-04-30 06:14:51 +00:00
|
|
|
HELIO_RELEASE_FLAGS = -DHELIO_RELEASE_FLAGS="-flto -g1 -gz"
|
2022-12-23 17:48:15 +00:00
|
|
|
HELIO_USE_STATIC_LIBS = ON
|
|
|
|
HELIO_OPENSSL_USE_STATIC_LIBS = ON
|
|
|
|
HELIO_ENABLE_GIT_VERSION = ON
|
|
|
|
HELIO_WITH_UNWIND = OFF
|
|
|
|
|
2023-08-29 15:24:29 +00:00
|
|
|
# equivalent to: if $(uname_m) == x86_64 || $(uname_m) == amd64
|
|
|
|
ifneq (, $(filter $(BUILD_ARCH),x86_64 amd64))
|
|
|
|
HELIO_MARCH_OPT := -march=core2 -msse4.1 -mpopcnt -mtune=skylake
|
|
|
|
endif
|
|
|
|
|
2022-12-23 17:48:15 +00:00
|
|
|
HELIO_FLAGS = $(if $(HELIO_RELEASE),-release $(HELIO_RELEASE_FLAGS),) \
|
|
|
|
-DBoost_USE_STATIC_LIBS=$(HELIO_USE_STATIC_LIBS) \
|
|
|
|
-DOPENSSL_USE_STATIC_LIBS=$(HELIO_OPENSSL_USE_STATIC_LIBS) \
|
|
|
|
-DENABLE_GIT_VERSION=$(HELIO_ENABLE_GIT_VERSION) \
|
2023-08-29 15:24:29 +00:00
|
|
|
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) -DMARCH_OPT="$(HELIO_MARCH_OPT)"
|
2022-12-23 17:48:15 +00:00
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
|
|
|
|
configure:
|
|
|
|
./helio/blaze.sh $(HELIO_FLAGS)
|
|
|
|
|
|
|
|
build:
|
|
|
|
cd build-opt; \
|
|
|
|
ninja dragonfly; \
|
|
|
|
ldd dragonfly
|
|
|
|
|
|
|
|
build-debug:
|
|
|
|
cd build-dbg; \
|
|
|
|
ninja dragonfly; \
|
|
|
|
ldd dragonfly
|
|
|
|
|
|
|
|
package:
|
|
|
|
cd build-opt; \
|
|
|
|
mv dragonfly $(RELEASE_NAME); \
|
|
|
|
tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md
|
|
|
|
|
|
|
|
release: configure build
|
|
|
|
|
|
|
|
release-debug: configure build-debug
|
|
|
|
|
|
|
|
default: release
|