properly respect $DEBUG in the Makefile
This commit is contained in:
12
Makefile
12
Makefile
@ -1,12 +1,19 @@
|
|||||||
SOURCE := main.c opts.c directive.c file_utils.c error.c dictate.c
|
SOURCE := main.c opts.c directive.c file_utils.c error.c dictate.c
|
||||||
SOURCE := $(addprefix source/, ${SOURCE})
|
SOURCE := $(addprefix source/, ${SOURCE})
|
||||||
|
|
||||||
CFLAGS := -O0
|
CFLAGS += -Wno-unused-label
|
||||||
|
|
||||||
|
ifeq (${DEBUG}, 1)
|
||||||
|
CFLAGS += -O0 -ggdb -Wall -Wpedantic
|
||||||
|
CPPFLAGS += -DDEBUG
|
||||||
|
else
|
||||||
|
CFLAGS += -O3 -flto=auto -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
OUT := vimdir
|
OUT := vimdir
|
||||||
|
|
||||||
${OUT}: ${SOURCE}
|
${OUT}: ${SOURCE}
|
||||||
${CC} ${CFLAGS} -o ${OUT} ${SOURCE} -ggdb
|
${CC} ${CPPFLAGS} ${CFLAGS} -o ${OUT} ${SOURCE}
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cmdtest --fast
|
cmdtest --fast
|
||||||
@ -23,5 +30,6 @@ install: bundle
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm ${OUT}
|
-rm ${OUT}
|
||||||
|
-rm vimdir.tar
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
Reference in New Issue
Block a user