Browse Source

Added features to makefile

emil
Emil 10 months ago
parent
commit
ffb9b1d9d8
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      Makefile

+ 13
- 2
Makefile View File

@@ -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…
Cancel
Save