-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
72 lines (55 loc) · 1.85 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
BUILD = build
ORG = org
DIRS = lib tools testgen tests src unittests
export CPP = cpp
export LD = ld
export CC = gcc
export AR = ar
export CFLAGS = -rdynamic -O3 -DNDEBUG -g -Wall -std=c99 \
-Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -Winline -Wstrict-prototypes
.PHONY: all runscript run debug runx debugx runm debugm runp debugp runpx debugpx test clean
all:
@for i in $(DIRS); do \
$(MAKE) -C $$i all || { echo "Make: Error (`pwd`)"; exit 1; } ; \
done
start: all
$(BUILD)/gimmix $(PARAMS) -i
runscript: all
$(BUILD)/gimmix $(PARAMS) --script=tests/cli/$(SCRIPT).script
run: all
$(BUILD)/gimmix $(PARAMS) --user -l $(BUILD)/tests/$(PROG).mmx \
--postcmds=`sed -n 1,1p tests/$(PROG).test`
debug: all
$(BUILD)/gimmix $(PARAMS) --user -i -l $(BUILD)/tests/$(PROG).mmx
runx: all
$(BUILD)/gimmix $(PARAMS) -l $(BUILD)/tests/$(PROG).mmx \
--postcmds=`sed -n 1,1p tests/$(PROG).test`
debugx: all
$(BUILD)/gimmix $(PARAMS) -i -l $(BUILD)/tests/$(PROG).mmx
runm: all
make -C $(ORG)
./$(ORG)/build/mmix $(BUILD)/tests/$(PROG).mmo --postcmds=`sed -n 1,1p tests/$(PROG).test`
debugm: all
make -C $(ORG)
./$(ORG)/build/mmix -i -v $(BUILD)/tests/$(PROG).mmo
runp: all
make -C $(ORG)
./$(ORG)/build/mmmix $(ORG)/plain.mmconfig $(BUILD)/tests/$(PROG).mmb \
--postcmds=`sed -n 1,1p tests/$(PROG).test`
debugp: all
make -C $(ORG)
./$(ORG)/build/mmmix $(ORG)/plain.mmconfig $(BUILD)/tests/$(PROG).mmb
runpx: all
make -C $(ORG)
./$(ORG)/build/mmmix $(ORG)/plain.mmconfig $(BUILD)/tests/$(PROG).mmx \
--postcmds=`sed -n 1,1p tests/$(PROG).test`
debugpx: all
make -C $(ORG)
./$(ORG)/build/mmmix $(ORG)/plain.mmconfig $(BUILD)/tests/$(PROG).mmx
test: all
$(BUILD)/gimmixtest
clean:
@for i in $(DIRS); do \
$(MAKE) -C $$i clean || { echo "Make: Error (`pwd`)"; exit 1; } ; \
done