summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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