]> Sergey Matveev's repositories - nnn.git/commitdiff
Makefile detect header change (#355)
authorAnna Arad <4895022+annagrram@users.noreply.github.com>
Sat, 12 Oct 2019 21:37:53 +0000 (00:37 +0300)
committerMischievous Meerkat <engineerarun@gmail.com>
Sat, 12 Oct 2019 21:37:53 +0000 (03:07 +0530)
Makefile

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