From e15dabde747c71dfcf49e4818099c4cc526c2d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Fri, 24 Oct 2014 10:50:14 +0200 Subject: Use depend file for header build dependencies --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bc99590..b17dcf4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20141001 +VERSION = git-20141024 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man @@ -16,6 +16,14 @@ all: sxiv $(OBJ): Makefile config.h +depend: .depend + +.depend: $(SRC) + rm -f ./.depend + $(CC) $(CFLAGS) -MM $^ >./.depend + +include .depend + .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $< -- cgit v1.2.3