This is consistent with the fact that custom LDFLAGS are already allowed, and
for once, it makes warning options easier to control.
Also use automatic variables $@ and $^ consistently.
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
-#CPPFLAGS = -DDEBUG
-#CFLAGS = -g
-CFLAGS = -O3 -march=native
+CFLAGS += -O3 -march=native
LDLIBS = -lcurses
DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
$(SRC): $(LOCALCONFIG)
$(BIN): $(SRC)
- $(CC) $(CFLAGS) -o $@ $(SRC) $(LDFLAGS) $(LDLIBS)
- strip $(BIN)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
+ strip $@
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin