-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 763 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
REASON = @echo; if [ -f $@ ]; then echo "[mk $@: $?]"; else echo "[mk $@]"; fi
CFLAGS = -g
all: autobots
.c.o:
$(REASON)
$(COMPILE.c) $< $(OUTPUT_OPTION)
autobots: strategy.o autobots.o
$(REASON)
$(LINK.c) -o $@ $^ $(LDLIBS)
simulator: strategy.o simulator.o
$(REASON)
$(LINK.c) -o $@ $^ $(LDLIBS)
test: simulator
simulator < test-row-1 > /dev/null
simulator < test-row-2 > /dev/null
simulator < test-row-3 > /dev/null
simulator < test-row-4 > /dev/null
simulator < test-row-5 > /dev/null
simulator < test-row-6 > /dev/null
simulator < test-row-7 > /dev/null
simulator < test-row-8 > /dev/null
deps depend:
$(REASON)
$(CC) -MM $(CFLAGS) *.c > deps
clean:
$(RM) *.o core err deps tags *~
tags:
ctags --format=2 -o $@ -R .
-include deps