fine tuned make file
This commit is contained in:
12
Makefile
12
Makefile
@ -1,15 +1,17 @@
|
|||||||
DEBUG:=0
|
|
||||||
|
|
||||||
LIBS:=ncurses readline history
|
LIBS:=ncurses readline history
|
||||||
|
|
||||||
CC:=gcc
|
CC:=gcc
|
||||||
CFLAGS:=-Wall -Wextra -Wpedantic
|
CFLAGS += $(if $(SAN),-fsanitize=${SAN})
|
||||||
CFLAGS +=$(if $(DEBUG),-O0 -ggdb -Wall -Wpedantic,-O3 -flto=auto -fomit-frame-pointer)
|
|
||||||
CFLAGS +=$(if $(SAN),-fsanitize=${SAN})
|
|
||||||
CPPFLAGS:=-I config/ -I ${CHDRD} ${shell pkg-config --cflags ${LIBS}}
|
CPPFLAGS:=-I config/ -I ${CHDRD} ${shell pkg-config --cflags ${LIBS}}
|
||||||
LDLIBS=${shell pkg-config --libs ${LIBS}}
|
LDLIBS=${shell pkg-config --libs ${LIBS}}
|
||||||
LEX:=flex
|
LEX:=flex
|
||||||
|
|
||||||
|
ifeq (${DEBUG}, 1)
|
||||||
|
CFLAGS += -O0 -ggdb -Wall -Wpedantic
|
||||||
|
else
|
||||||
|
CFLAGS += -O3 -flto=auto -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
LEXD:=source/
|
LEXD:=source/
|
||||||
LEXF:=$(shell find ${LEXD} -iname '*.l')
|
LEXF:=$(shell find ${LEXD} -iname '*.l')
|
||||||
GENLEX:=$(subst .l,.c,${LEXF})
|
GENLEX:=$(subst .l,.c,${LEXF})
|
||||||
|
Reference in New Issue
Block a user