Small clean up of the Makefile
CFG_DEV is replaced by BUILD_TYPE. Debug build is fixed, set BUILD_TYPE to Debug to make a debug build. Add an option to compile with sanitizers.
This commit is contained in:
parent
7844634853
commit
9b24550814
15
Makefile
15
Makefile
|
@ -110,15 +110,16 @@ CFG += -DCOMPTON_VERSION="\"$(COMPTON_VERSION)\""
|
|||
|
||||
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed
|
||||
|
||||
ifeq "$(CFG_DEV)" ""
|
||||
BUILD_TYPE ?= "Debug"
|
||||
|
||||
ifeq "$(BUILD_TYPE)" "Release"
|
||||
CFLAGS ?= -DNDEBUG -O2 -D_FORTIFY_SOURCE=2
|
||||
else
|
||||
CC = clang
|
||||
export LD_ALTEXEC = /usr/bin/ld.gold
|
||||
OBJS += backtrace-symbols.o
|
||||
LIBS += -lbfd
|
||||
else ifeq "$(BUILD_TYPE)" "Debug"
|
||||
CFLAGS += -ggdb -Wshadow
|
||||
# CFLAGS += -Weverything -Wno-disabled-macro-expansion -Wno-padded -Wno-gnu
|
||||
endif
|
||||
|
||||
ifeq "$(ENABLE_SAN)" "1"
|
||||
CFLAGS += -fsanitize=address,undefined
|
||||
endif
|
||||
|
||||
LIBS += $(shell pkg-config --libs $(PACKAGES))
|
||||
|
|
Loading…
Reference in New Issue