Krolyxon
Commit e15dabd

Branches

Refs →

nsxive15dabd

Use depend file for header build dependencies

Author
Bert Münnich
Date
2014-10-24 10:50 +0200
Parent
c33f2ad
Commit
e15dabde747c71dfcf49e4818099c4cc526c2d21

+10 −1

2 files changed

  1. M .gitignore +1 −0
  2. M Makefile +9 −1
M .gitignore View
@@ -1,3 +1,4 @@
1+.depend
12 config.h
23 *.o
34 sxiv
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20141001
1+VERSION = git-20141024
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
@@ -16,6 +16,14 @@ all: sxiv
1616
1717 $(OBJ): Makefile config.h
1818
19+depend: .depend
20+
21+.depend: $(SRC)
22+ rm -f ./.depend
23+ $(CC) $(CFLAGS) -MM $^ >./.depend
24+
25+include .depend
26+
1927 .c.o:
2028 $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
2129