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