nsxive15dabd
Use depend file for header build dependencies
+10 −1
2 files changed
- M .gitignore +1 −0
- M Makefile +9 −1
| @@ -1,3 +1,4 @@ | |||
| 1 | + | .depend | |
| 1 | 2 | config.h | |
| 2 | 3 | *.o | |
| 3 | 4 | sxiv | |
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20141001 | |
| 1 | + | VERSION = git-20141024 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -16,6 +16,14 @@ all: sxiv | |||
| 16 | 16 | ||
| 17 | 17 | $(OBJ): Makefile config.h | |
| 18 | 18 | ||
| 19 | + | depend: .depend | |
| 20 | + | ||
| 21 | + | .depend: $(SRC) | |
| 22 | + | rm -f ./.depend | |
| 23 | + | $(CC) $(CFLAGS) -MM $^ >./.depend | |
| 24 | + | ||
| 25 | + | include .depend | |
| 26 | + | ||
| 19 | 27 | .c.o: | |
| 20 | 28 | $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $< | |
| 21 | 29 | ||