-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 1013 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 1013 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
CC=gcc
CFLAGS=-std=c11 -Wall -Wextra -O2
PROGS=sum10 call_add inc_test dec_test clr_test outdec_test new_instructions_test
TEST_PROGS=cmpw_load_je_test outdec_range_test subw_test rmmovbr_test irmovw_test mrmovb_test rmmovb_test \
mrmovbr_test jne_test io16_mrmovw_test io16_rmmovw_test call_overflow_test ret_underflow_test
all: quack qasm
quack: quack.c
$(CC) $(CFLAGS) -o quack quack.c
qasm: qasm.c
$(CC) $(CFLAGS) -o qasm qasm.c
programs: qasm
for p in $(PROGS); do ./qasm programs/$$p.qasm -o programs/$$p.duck || exit 1; done
for p in $(TEST_PROGS); do ./qasm tests/programs/$$p.qasm -o tests/programs/$$p.duck || exit 1; done
memtest: tests/memtest_main.c quack.c tests/lab1_test.c
rm -f test
$(CC) $(CFLAGS) -Wno-unused-parameter -I. -o test tests/memtest_main.c
./test
test: quack qasm
bash tests/roundtrip.sh
bash tests/e2e.sh
bash tests/errors.sh
bash tests/coverage.sh
bash tests/runtime_errors.sh
clean:
rm -f quack qasm test
.PHONY: all clean memtest programs test