Added features to makefile
This commit is contained in:
parent
d990460011
commit
ffb9b1d9d8
15
Makefile
15
Makefile
@ -1,6 +1,7 @@
|
||||
# CC=gcc
|
||||
CFLAGS:=-Wall -Wextra -Wpedantic -ggdb $(shell pkg-config --cflags ncurses readline)
|
||||
LDLIBS=-I ${CHDRD} $(shell pkg-config --libs ncurses readline)
|
||||
CFLAGS:=-Wall -Wextra -Wpedantic
|
||||
CPPFLAGS:=-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600
|
||||
LDLIBS=-I ${CHDRD} -lncurses -ltinfo -lreadline
|
||||
LEX:=flex
|
||||
|
||||
LEXD:=src/
|
||||
@ -19,6 +20,16 @@ CHDR:=$(addsuffix .gch,$(subst ${HDRD},${CHDRD},${HDR}))
|
||||
|
||||
OUTPUT:=csope
|
||||
|
||||
ifeq (${DEBUG},1)
|
||||
CFLAGS += -Og -ggdb
|
||||
else
|
||||
CFLAGS += -O3 -flto=auto -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifdef SAN
|
||||
CFLAGS += -fsanitize=${SAN}
|
||||
endif
|
||||
|
||||
main: ${CHDR} ${OBJ}
|
||||
${LINK.c} ${OBJ} -o ${OUTPUT} ${LDLIBS}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user