--- a/makefile +++ b/makefile @@ -13,7 +13,9 @@ CURSES_CFLAGS := $(shell ncursesw6-config --cflags) CURSES_LIBS := $(shell ncursesw6-config --libs) -CFLAGS += $(INCS) -Wall $(CURSES_CFLAGS) +LIBS += $(CURSES_LIBS) +FLAGS := +CFLAGS += $(FLAGS) $(INCS) -Wall $(CURSES_CFLAGS) SRC_CII := cii/src/except.c cii/src/fmt.c cii/src/str.c cii/src/text.c # Files in library/ that need to be compiled @@ -31,17 +33,17 @@ SRC_LISP := library/bit.lsp \ library/plot.lsp \ library/unistd.lsp -CFLAGS += -O3 -DNDEBUG=1 -Wno-stringop-truncation +CFLAGS += -DNDEBUG=1 -Wno-stringop-truncation ifeq ($(USE_FLTO),1) -CFLAGS += -O3 -flto -DNDEBUG=1 -Wno-stringop-truncation +CFLAGS += -flto -DNDEBUG=1 -Wno-stringop-truncation endif ifeq ($(USE_GDB),1) CFLAGS += -O0 -g -DNDEBUG=1 -Wno-stringop-truncation endif ifeq ($(shell uname -n),raspberrypi) -CFLAGS += -O3 -DNDEBUG=1 -Wno-stringop-truncation -Wno-array-bounds +CFLAGS += -DNDEBUG=1 -Wno-stringop-truncation -Wno-array-bounds endif SRC_CII += cii/src/mem.c