diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-19 16:08:29 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-19 16:08:29 -0400 |
commit | f2caf2c09fc431e11068c13a49ae28f18182bea9 (patch) | |
tree | 7704d2131de1146dc3c0486c2edee4bfcc7b8b36 /Makefile | |
parent | 1af772beadf5d03822c2cbdf80987e0580813602 (diff) | |
download | mazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.tar.gz mazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.tar.bz2 mazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.zip |
Added dependency generation
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile index 0eb1738..7e812d9 100644 --- a/Makefile +++ b/Makefile | |||
@@ -9,5 +9,13 @@ mazeoflife: $(OBJS) | |||
9 | %.o: %.cpp | 9 | %.o: %.cpp |
10 | $(CC) -c $< $(CFLAGS) -o $@ | 10 | $(CC) -c $< $(CFLAGS) -o $@ |
11 | 11 | ||
12 | %.d: %.cpp | ||
13 | @set -e; rm -f $@; \ | ||
14 | $(CC) -MM $(CFLAGS) $< > $@.$$$$; \ | ||
15 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ | ||
16 | rm -f $@.$$$$ | ||
17 | |||
18 | include $(OBJS:.o=.d) | ||
19 | |||
12 | clean: | 20 | clean: |
13 | rm -rdfv $(OBJS) mazeoflife | 21 | rm -rdfv $(OBJS) $(OBJS:.o=.d) mazeoflife |