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