Makefile detect header change (#355)

This commit is contained in:
Anna Arad 2019-10-13 00:37:53 +03:00 committed by Mischievous Meerkat
parent 2f413f8059
commit 6d7c25822a

View file

@ -59,14 +59,13 @@ LDLIBS += $(LDLIBS_CURSES)
DISTFILES = src nnn.1 Makefile README.md LICENSE DISTFILES = src nnn.1 Makefile README.md LICENSE
SRC = src/nnn.c SRC = src/nnn.c
HEADERS = src/nnn.h
BIN = nnn BIN = nnn
all: $(BIN) all: $(BIN)
$(SRC): src/nnn.h $(BIN): $(SRC) $(HEADERS)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
$(BIN): $(SRC)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
# targets for backwards compatibility # targets for backwards compatibility
debug: $(BIN) debug: $(BIN)