handle make DEBUG=1

This commit is contained in:
CK Tan 2019-02-19 15:52:01 -08:00
parent 05e27a7cab
commit 0ce0c0d9d0

View file

@ -2,8 +2,13 @@ CC = gcc
CFILES = toml.c CFILES = toml.c
CFLAGS = -std=c99 -Wall -Wextra CFLAGS = -std=c99 -Wall -Wextra
CFLAGS += -O2 -DNDEBUG # to compile for debug: make DEBUG=1
#CFLAGS += -O0 -g # to compile for no debug: make
ifdef DEBUG
CFLAGS += -O0 -g
else
CFLAGS += -O2 -DNDEBUG
endif
EXEC = toml_json toml_cat EXEC = toml_json toml_cat