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