From 6d7c25822a89de1deb0a6326ab37160198b3a703 Mon Sep 17 00:00:00 2001 From: Anna Arad <4895022+annagrram@users.noreply.github.com> Date: Sun, 13 Oct 2019 00:37:53 +0300 Subject: Makefile detect header change (#355) --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b707ec2..136da5f 100644 --- 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) -- cgit v1.2.3-70-g09d2