1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

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:
Yuxuan Shui 2018-05-21 14:25:56 +01:00
parent 7844634853
commit 9b24550814

View file

@ -110,15 +110,16 @@ CFG += -DCOMPTON_VERSION="\"$(COMPTON_VERSION)\""
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed LDFLAGS ?= -Wl,-O1 -Wl,--as-needed
ifeq "$(CFG_DEV)" "" BUILD_TYPE ?= "Debug"
ifeq "$(BUILD_TYPE)" "Release"
CFLAGS ?= -DNDEBUG -O2 -D_FORTIFY_SOURCE=2 CFLAGS ?= -DNDEBUG -O2 -D_FORTIFY_SOURCE=2
else else ifeq "$(BUILD_TYPE)" "Debug"
CC = clang
export LD_ALTEXEC = /usr/bin/ld.gold
OBJS += backtrace-symbols.o
LIBS += -lbfd
CFLAGS += -ggdb -Wshadow CFLAGS += -ggdb -Wshadow
# CFLAGS += -Weverything -Wno-disabled-macro-expansion -Wno-padded -Wno-gnu endif
ifeq "$(ENABLE_SAN)" "1"
CFLAGS += -fsanitize=address,undefined
endif endif
LIBS += $(shell pkg-config --libs $(PACKAGES)) LIBS += $(shell pkg-config --libs $(PACKAGES))