aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
2 files changed, 10 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b423673..7dd1d86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.depend
config.h
*.o
sxiv
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 $@ $<