Initial revision
[tinycc.git] / Makefile
blobfb4ada47e84b2f51d4871b7fc3b201d77d71bd7a
1 all: test cvt
3 test: prog.bin
4 cmp -l prog.bin prog.bin.ref
6 run: tc prog.c
7 ./tc prog.c
9 run2: tc tc1.c prog.c
10 ./tc tc1.c prog.c
12 run3: tc tc1.c prog.c
13 ./tc tc1.c tc1.c prog.c
15 prog.bin: prog.c tct
16 ./tct prog.c $@
17 ndisasm -b 32 $@
19 p2.bin: p2.c tct
20 ./tct $< $@
21 ndisasm -b 32 $@
23 tct: tc.c
24 gcc -DTEST -O2 -g -o $@ $< -ldl
26 tc: tc.c Makefile
27 gcc -O2 -Wall -g -o $@ $< -ldl
29 tc1: tc1.c
30 gcc -O2 -Wall -g -o $@ $<
32 cvt: cvt.c
33 gcc -O2 -Wall -g -o $@ $<
35 instr.o: instr.S
36 gcc -O2 -Wall -g -c -o $@ $<
38 tc.i: tc.c Makefile
39 gcc -E -P -DTINY -o $@ tc.c
41 tc1.c: tc.i cvt Makefile
42 ./cvt $< $@
43 @ls -l $@
45 test2: tct tc1.c
46 ./tct tc1.c tc2
47 ndisasm -b 32 tc2
49 tc2: tc
50 ./tct < tc1.c > tc2
51 ndisasm -b 32 tc2