summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 16:08:29 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 16:08:29 -0400
commitf2caf2c09fc431e11068c13a49ae28f18182bea9 (patch)
tree7704d2131de1146dc3c0486c2edee4bfcc7b8b36 /Makefile
parent1af772beadf5d03822c2cbdf80987e0580813602 (diff)
downloadmazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.tar.gz
mazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.tar.bz2
mazeoflife-f2caf2c09fc431e11068c13a49ae28f18182bea9.zip
Added dependency generation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
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
18include $(OBJS:.o=.d)
19
12clean: 20clean:
13 rm -rdfv $(OBJS) mazeoflife 21 rm -rdfv $(OBJS) $(OBJS:.o=.d) mazeoflife