From d07bdacab919cde0bf8668995045642067558fa3 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 22 Oct 2017 04:03:43 +0200 Subject: [PATCH] Introduce debug target --- Makefile | 5 +++++ config.mk | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 58c8370..316e9d6 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,11 @@ TEST_OBJ := $(TEST_SRC:.c=.o) all: doc dunst service +debug: CFLAGS += ${CFLAGS_DEBUG} +debug: LDFLAGS += ${LDFLAGS_DEBUG} +debug: CPPFLAGS += ${CPPFLAGS_DEBUG} +debug: all + .c.o: ${CC} -o $@ -c $< ${CFLAGS} diff --git a/config.mk b/config.mk index 12a85f7..2484df3 100644 --- a/config.mk +++ b/config.mk @@ -11,6 +11,10 @@ CPPFLAGS += -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" CFLAGS += -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC} ${CPPFLAGS} LDFLAGS += -lm -L${X11LIB} +CPPFLAGS_DEBUG := -DDEBUG_BUILD +CFLAGS_DEBUG := -O0 +LDFLAGS_DEBUG := + pkg_config_packs := dbus-1 \ gio-2.0 \ gdk-3.0 \