fine tuned make file

This commit is contained in:
anon 2023-11-24 16:26:47 +01:00
parent 4672dd14d8
commit 94311625d4

View File

@ -1,15 +1,17 @@
DEBUG:=0
LIBS:=ncurses readline history
CC:=gcc
CFLAGS:=-Wall -Wextra -Wpedantic
CFLAGS +=$(if $(DEBUG),-O0 -ggdb -Wall -Wpedantic,-O3 -flto=auto -fomit-frame-pointer)
CFLAGS +=$(if $(SAN),-fsanitize=${SAN})
CFLAGS += $(if $(SAN),-fsanitize=${SAN})
CPPFLAGS:=-I config/ -I ${CHDRD} ${shell pkg-config --cflags ${LIBS}}
LDLIBS=${shell pkg-config --libs ${LIBS}}
LEX:=flex
ifeq (${DEBUG}, 1)
CFLAGS += -O0 -ggdb -Wall -Wpedantic
else
CFLAGS += -O3 -flto=auto -fomit-frame-pointer
endif
LEXD:=source/
LEXF:=$(shell find ${LEXD} -iname '*.l')
GENLEX:=$(subst .l,.c,${LEXF})