diff --git a/Makefile b/Makefile index 61aef89..6850f28 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ OBJ += line_info.o log.o message_queue.o misc_tools.o name_lookup.o notify.o pro OBJ += term_mplex.o toxic.o toxic_strings.o windows.o # Check if debug build is enabled -RELEASE := $(shell if [ -z "$(RELEASE_ENABLED)" ] || [ "$(RELEASE_ENABLED)" = "0" ] ; then echo disabled ; else echo enabled ; fi) +RELEASE := $(shell if [ -z "$(ENABLE_RELEASE)" ] || [ "$(ENABLE_RELEASE)" = "0" ] ; then echo disabled ; else echo enabled ; fi) ifneq ($(RELEASE), enabled) CFLAGS += -O0 -g -DDEBUG LDFLAGS += -O0 @@ -28,8 +28,8 @@ else endif # Check if LLVM Address Sanitizer is enabled -ASAN_ENABLED := $(shell if [ -z "$(ENABLE_ASAN)" ] || [ "$(ENABLE_ASAN)" = "0" ] ; then echo disabled ; else echo enabled ; fi) -ifneq ($(ASAN_ENABLED), disabled) +ENABLE_ASAN := $(shell if [ -z "$(ENABLE_ASAN)" ] || [ "$(ENABLE_ASAN)" = "0" ] ; then echo disabled ; else echo enabled ; fi) +ifneq ($(ENABLE_ASAN), disabled) CFLAGS += -fsanitize=address -fno-omit-frame-pointer endif diff --git a/cfg/targets/help.mk b/cfg/targets/help.mk index dafb34b..78a7a6a 100644 --- a/cfg/targets/help.mk +++ b/cfg/targets/help.mk @@ -17,8 +17,8 @@ help: @echo " DISABLE_QRCODE: Set to \"1\" to force building without QR export support" @echo " DISABLE_QRPNG: Set to \"1\" to force building without QR exported as PNG support" @echo " ENABLE_PYTHON: Set to \"1\" to enable building with Python scripting support" - @echo " RELEASE_ENABLED: Set to \"1\" to build without debug symbols and with full compiler optimizations" - @echo " ASAN_ENABLED: Set to \"1\" to build with LLVM address sanitizer enabled. + @echo " ENABLE_RELEASE: Set to \"1\" to build without debug symbols and with full compiler optimizations" + @echo " ENABLE_ASAN: Set to \"1\" to build with LLVM address sanitizer enabled. @echo " USER_CFLAGS: Add custom flags to default CFLAGS" @echo " USER_LDFLAGS: Add custom flags to default LDFLAGS" @echo " PREFIX: Specify a prefix directory for binaries, data files,... (default is \"$(abspath $(PREFIX))\")"