0
|
1 CC = gcc
|
59
|
2 CFLAGS = -g -Wall -I.
|
0
|
3 BASE=0
|
|
4 STAGE=1
|
|
5 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE)
|
|
6 MC=mc
|
|
7 PRINTF= # printf.c
|
66
|
8 CONVERTER=conv/c.o
|
|
9 # conv/c2cbc.o conv/cbc2c.o conv/null.o
|
0
|
10
|
|
11 all: mc
|
|
12
|
61
|
13 mc : mc-parse.o mc-codegen.o mc-code-ia32.o mc-tree.o $(CONVERTER)
|
|
14 $(CC) -g mc-parse.o mc-codegen.o mc-code-ia32.o \
|
|
15 mc-tree.o $(CONVERTER) -o $@
|
|
16
|
67
|
17 conv/conv.h: conv_func.tbl
|
|
18 perl conv_func.pl
|
|
19 conv/convdef.h: conv_func.tbl
|
|
20 perl conv_func.pl
|
|
21
|
0
|
22 tar :
|
|
23 make clean
|
|
24 tar cBf - . | gzip > ../comp.tgz
|
|
25
|
|
26 depend :
|
67
|
27 makedepend mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \
|
|
28 mc-parse.c mc-tree.c mc.h \
|
|
29 conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \
|
|
30 conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h
|
0
|
31
|
|
32 clean :
|
81
|
33 -rm -f *.bak *.s *.o *.cc mc mc1 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~
|
0
|
34
|
78
|
35 mc1 : b00.s b01.s mc-codegen.o mc-tree.o $(CONVERTER)
|
|
36 $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o $(CONVERTER)
|
0
|
37 b00.s : mc-parse.c mc
|
65
|
38 ./mc -s -ob00.s mc-parse.c
|
62
|
39 b01.s : mc-code-ia32.c mc
|
65
|
40 ./mc -s -ob01.s mc-code-ia32.c
|
0
|
41 b10.s : mc-parse.c mc1
|
65
|
42 ./mc1 -s -ob10.s mc-parse.c
|
62
|
43 b11.s : mc-code-ia32.c $(PRINTF) mc1
|
65
|
44 ./mc1 -s -ob11.s mc-code-ia32.c
|
0
|
45
|
|
46 diff : b00.s b01.s b10.s b11.s
|
|
47 -diff b00.s b10.s
|
|
48 -diff b01.s b11.s
|
67
|
49
|
0
|
50 # DO NOT DELETE
|
|
51
|
67
|
52 mc-code-ia32.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
53 mc-code-ia32.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
54 mc-code-ia32.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
55 mc-code-ia32.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
56 mc-code-ia32.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
57 mc-code-ia32.o: conv/conv.h conv/c.h mc-codegen.h
|
|
58 mc-codegen.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
59 mc-codegen.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
60 mc-codegen.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
61 mc-codegen.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
62 mc-codegen.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
63 mc-codegen.o: conv/conv.h conv/c.h mc-codegen.h mc-code.h
|
|
64 mc-parse.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
65 mc-parse.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
66 mc-parse.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
67 mc-parse.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
68 mc-parse.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
69 mc-parse.o: conv/conv.h conv/c.h mc-codegen.h
|
|
70 mc-tree.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
71 mc-tree.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
72 mc-tree.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
73 mc-tree.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
74 mc-tree.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
75 mc-tree.o: conv/conv.h conv/c.h
|
|
76 mc.o: /usr/include/stdio.h /usr/include/sys/types.h
|
|
77 mc.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
78 mc.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
79 mc.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
80 mc.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h conv/conv.h
|
|
81 mc.o: conv/c.h
|
|
82 conv/c.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
83 conv/c.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
84 conv/c.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
85 conv/c.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
86 conv/c.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h conv/conv.h
|
|
87 conv/c.o: conv/c.h conv/convdef.h
|
|
88 conv/c2cbc.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
89 conv/c2cbc.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
90 conv/c2cbc.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
91 conv/c2cbc.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
92 conv/c2cbc.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
93 conv/c2cbc.o: conv/conv.h conv/c.h
|
|
94 conv/cbc2c.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
95 conv/cbc2c.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
96 conv/cbc2c.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
97 conv/cbc2c.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
98 conv/cbc2c.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
99 conv/cbc2c.o: conv/conv.h conv/c.h
|
|
100 conv/null.o: mc.h /usr/include/stdio.h /usr/include/sys/types.h
|
|
101 conv/null.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h
|
|
102 conv/null.o: /usr/include/machine/types.h /usr/include/ppc/types.h
|
|
103 conv/null.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h
|
|
104 conv/null.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
|
|
105 conv/null.o: conv/conv.h conv/c.h
|