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