move debug flags to new variable, move address sanitizer flags to debug flags

This commit is contained in:
Akos Horvath 2023-09-17 15:18:13 +02:00
parent 1aace4baa9
commit 56a7a98ed9

View File

@ -1,6 +1,7 @@
CC=gcc CC=gcc
EXT=.c EXT=.c
FLAGS=-O0 -g -fsanitize=undefined -fsanitize=address FLAGS=-O0 -g
DEBUG_FLAGS=-DDEBUG -fsanitize=undefined -fsanitize=address
DEPFLAGS=-MD -MP DEPFLAGS=-MD -MP
LIBS=$(shell pkg-config --libs xcb x11 xinerama) LIBS=$(shell pkg-config --libs xcb x11 xinerama)
EXEC_NAME=wm EXEC_NAME=wm
@ -26,7 +27,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%$(EXT)
$(CC) $(FLAGS) $(DEPFLAGS) -c -o $@ $< $(CC) $(FLAGS) $(DEPFLAGS) -c -o $@ $<
debug_flag: debug_flag:
$(eval FLAGS+=-DDEBUG) $(eval FLAGS+=$(DEBUG_FLAGS))
filter: filter:
$(eval OBJS=$(filter-out obj/tests.o, $(OBJS))) $(eval OBJS=$(filter-out obj/tests.o, $(OBJS)))