handle make DEBUG=1

This commit is contained in:
CK Tan 2019-02-19 15:52:01 -08:00
parent 05e27a7cab
commit 0ce0c0d9d0
1 changed files with 7 additions and 2 deletions

View File

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