From 39ec615b54c0cc2734ac29ba4caac574c21503a4 Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Mon, 12 Aug 2019 14:31:10 +0200 Subject: Arrange makefile debug target Do not try defining macros in the prerequisite section Make the DEBUG macro a config macro --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b2299c8..7318943 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,6 @@ INC = config.h gramscii.h arg.h OBJ = ${SRC:.c=.o} DISTFILES = ${SRC} ${INC} Makefile config.mk README.md Changelog -DEBUG = -O0 -Wall -pedantic -g -DDEBUG - - all: options gramscii options: @@ -21,13 +18,12 @@ options: @echo "CC = ${CC}" @echo "-+-+-+-+-+-+-+-+-+-+-" - gramscii: ${OBJ} ${OBJ}: ${INC} -debug: CFLAGS = ${DEBUG} -debug: clean all +debug: clean + ${MAKE} CFLAGS="${DEBUG}" all clean: @echo cleaning @@ -57,4 +53,3 @@ dist: clean @tar -cf gramscii-${VERSION}.tar ./gramscii-${VERSION} @gzip gramscii-${VERSION}.tar @rm -rf gramscii-${VERSION} - -- cgit v1.2.3