--- Makefile.orig 2019-08-06 13:35:52 UTC +++ Makefile @@ -1,18 +1,20 @@ CC ?= gcc CFLAGS ?= -std=c99 -Wall -Wextra -pedantic -Os +CPPFLAGS ?= +LDFLAGS ?= FEATURES ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -HEADERS ?= -LIBPATH ?= DESTDIR ?= /usr/local MANDIR ?= $(DESTDIR)/man/man1 CURSESLIB ?= ncursesw -LIBS ?= -l$(CURSESLIB) -lutil +LIBRARIES ?= -l$(CURSESLIB) -lutil +CPPFLAGS += $(FEATURES) +LDFLAGS += $(LIBRARIES) + all: mtm mtm: vtparser.c mtm.c config.h - $(CC) $(CFLAGS) $(FEATURES) -o $@ $(HEADERS) vtparser.c mtm.c $(LIBPATH) $(LIBS) - strip -s mtm + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ vtparser.c mtm.c config.h: config.def.h cp -i config.def.h config.h