Fix Makefile

This commit is contained in:
Abdelrahman Said 2025-09-07 15:31:12 +01:00
parent f09d759b05
commit ba467c9067

View File

@ -1,3 +1,5 @@
.PHONY: help full prng testing uuid core primitives all clean builddir build-test run-test codegen install build-lib ccodegen
# External variables # External variables
CC = clang CC = clang
CXX = clang++ CXX = clang++
@ -29,11 +31,11 @@ override LIB_INSTALL := $(ABS_INSTALL_PREFIX)/lib
override HEADER_INSTALL_CMD := scripts/header_install.sh override HEADER_INSTALL_CMD := scripts/header_install.sh
ifeq ($(BUILD_TYPE),Debug) ifeq ($(BUILD_TYPE),Debug)
CFLAGS += -g -fsanitize=address,undefined -DWAPP_DEBUG_ASSERT override CFLAGS += -g -fsanitize=address,undefined -DWAPP_DEBUG_ASSERT
else ifeq ($(BUILD_TYPE),RelWithDebInfo) else ifeq ($(BUILD_TYPE),RelWithDebInfo)
CFLAGS += -g -O2 -fsanitize=address,undefined -DWAPP_DEBUG_ASSERT override CFLAGS += -g -O2 -fsanitize=address,undefined -DWAPP_DEBUG_ASSERT
else ifeq ($(BUILD_TYPE),Release) else ifeq ($(BUILD_TYPE),Release)
CFLAGS += -O3 override CFLAGS += -O3
else else
$(error Invalid BUILD type '$(BUILD_TYPE)'. Use 'Debug', 'RelWithDebInfo' or 'Release') $(error Invalid BUILD type '$(BUILD_TYPE)'. Use 'Debug', 'RelWithDebInfo' or 'Release')
endif endif
@ -43,8 +45,6 @@ ifeq ($(CC),gcc)
export ASAN_OPTIONS=verify_asan_link_order=0 export ASAN_OPTIONS=verify_asan_link_order=0
endif endif
.PHONY: help full prng testing uuid core primitives all clean builddir build-test run-test codegen install build-lib ccodegen
all: clean builddir codegen run-c-test full run-cc-test ccodegen all: clean builddir codegen run-c-test full run-cc-test ccodegen
help: help: