0
|
1 CC = gcc
|
|
2 CFLAGS = -g
|
|
3 BASE=0
|
|
4 STAGE=1
|
|
5 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE)
|
|
6 MC=mc
|
|
7 PRINTF= # printf.c
|
|
8
|
|
9 all: mc
|
|
10
|
|
11 mc : mc-parse.o mc-nop-386.o mc-tree.o
|
|
12 $(CC) -g $> -o $@
|
|
13 tar :
|
|
14 make clean
|
|
15 tar cBf - . | gzip > ../comp.tgz
|
|
16
|
|
17 depend :
|
|
18 makedepend mc-parse.c mc-nop-386.c mc-tree.c
|
|
19
|
|
20 clean :
|
|
21 -rm -f *.s *.o mc mc1 a.out *~
|
|
22
|
|
23 mc1 : b00.s b01.s mc-tree.o
|
|
24 $(CC) -g -o $@ $(PRINTF) mc-tree.o b00.s b01.s
|
|
25 b00.s : mc-parse.c mc
|
|
26 ./mc -s mc-parse.c
|
|
27 mv mcout.s $@
|
|
28 b01.s : mc-nop-386.c mc
|
|
29 ./mc -s mc-nop-386.c
|
|
30 mv mcout.s $@
|
|
31 b10.s : mc-parse.c mc1
|
|
32 ./mc1 -s mc-parse.c
|
|
33 mv mcout.s $@
|
|
34 b11.s : mc-nop-386.c $(PRINTF) mc1
|
|
35 ./mc1 -s mc-nop-386.c
|
|
36 mv mcout.s $@
|
|
37
|
|
38 diff : b00.s b01.s b10.s b11.s
|
|
39 -diff b00.s b10.s
|
|
40 -diff b01.s b11.s
|
|
41 # DO NOT DELETE
|
|
42
|
|
43 mc-parse.o: mc.h stdio.h
|
|
44 mc-nop-386.o: mc.h stdio.h
|
|
45 mc-tree.o: mc.h stdio.h
|