Mercurial > hg > CbC > old > device
annotate Makefile @ 452:8e3284b0a8c9
minor update
author | kono |
---|---|
date | Mon, 29 Nov 2004 04:15:38 +0900 |
parents | c55363eff5e5 |
children | 1e5ca85d3f97 |
rev | line source |
---|---|
363 | 1 CC = gcc |
127 | 2 # -O3 |
59 | 3 CFLAGS = -g -Wall -I. |
440 | 4 # CFLAGS = -g -Wall -I. -pg -fprofile-arcs -ftest-coverage |
5 # LDFLAGS = -pg | |
407 | 6 # for Linux Zaurus |
7 # CFLAGS = -fsigned-char -pipe -g -I. -I/home/zaurus/develop/include | |
445 | 8 CFLAGS1 = -g -I. |
0 | 9 BASE=0 |
10 STAGE=1 | |
11 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE) | |
126 | 12 ARCH=powerpc |
13 MC=mc-$(ARCH) | |
14 # MLIB = -lm | |
0 | 15 PRINTF= # printf.c |
82 | 16 CONVERTER=conv/c.o conv/null.o |
17 # conv/c2cbc.o conv/cbc2c.o | |
327 | 18 COMPLIB = mc-parse.o mc-codegen.o mc-switch.o mc-macro.o mc-tree.o |
109 | 19 # CODE=mc-code-ia32.c |
126 | 20 CODE=mc-code-$(ARCH).c |
420 | 21 # |
22 TARGET=test/simp | |
93 | 23 |
387 | 24 all: mc mc-ia32 mc-powerpc mc-mips mc-arm |
94 | 25 |
126 | 26 mc: mc-$(ARCH) |
27 cp mc-$(ARCH) mc | |
0 | 28 |
195 | 29 TAGS: |
213 | 30 ctags mc-code-powerpc.c mc-code.h mc-codegen.c mc-codegen.h \ |
327 | 31 mc-macro.c \ |
297 | 32 mc-parse.c mc-tree.c mc-switch.c mc-switch.h \ |
33 mc.h conv/c.c conv/c.h \ | |
195 | 34 conv/conv.h conv/convdef.h conv/null.c |
35 | |
94 | 36 mc-powerpc : mc-code-powerpc.o $(COMPLIB) $(CONVERTER) |
440 | 37 $(CC) $(LDFLAGS) -g mc-code-powerpc.o $(COMPLIB) $(CONVERTER) -o $@ |
94 | 38 |
39 mc-ia32 : mc-code-ia32.o $(COMPLIB) $(CONVERTER) | |
440 | 40 $(CC) $(LDFLAGS) -g mc-code-ia32.o $(COMPLIB) $(CONVERTER) -o $@ |
61 | 41 |
130 | 42 mc-mips : mc-code-mips.o $(COMPLIB) $(CONVERTER) |
440 | 43 $(CC) $(LDFLAGS) -g mc-code-mips.o $(COMPLIB) $(CONVERTER) -o $@ |
130 | 44 |
383 | 45 mc-arm : mc-code-arm.o $(COMPLIB) $(CONVERTER) |
440 | 46 $(CC) $(LDFLAGS) -g mc-code-arm.o $(COMPLIB) $(CONVERTER) -o $@ |
383 | 47 |
82 | 48 conv/conv.h: conv_func.tbl conv_func.pl |
67 | 49 perl conv_func.pl |
82 | 50 conv/convdef.h: conv_func.tbl conv_func.pl |
51 perl conv_func.pl | |
52 conv/null.c: conv_func.tbl conv_func.pl | |
67 | 53 perl conv_func.pl |
54 | |
166 | 55 mc.h-new: |
56 perl mc-h-renum.pl mc.h > mc.h.1 | |
57 mv mc.h.1 mc.h | |
58 | |
172 | 59 check-all: check-all-c check-all-code |
60 | |
61 check-all-c: | |
118 | 62 make check TARGET=test/basic |
63 make check TARGET=test/call | |
64 make check TARGET=test/fact0 | |
65 make check TARGET=test/float | |
66 make check TARGET=test/ifdef | |
67 make check TARGET=test/int | |
68 make check TARGET=test/macro | |
69 make check TARGET=test/regargs | |
172 | 70 make check TARGET=test/short |
118 | 71 make check TARGET=test/simp |
72 make check TARGET=test/simp0 | |
249 | 73 make check TARGET=test/simp1 |
172 | 74 make check TARGET=test/static |
118 | 75 make check TARGET=test/tmp |
76 make check TARGET=test/tmp10 | |
77 make check TARGET=test/tmp11 | |
161 | 78 make check TARGET=test/tmp12 |
336 | 79 make check TARGET=test/tmp5 |
118 | 80 make check TARGET=test/tmp7 |
336 | 81 make check TARGET=test/tmp8 |
118 | 82 make check TARGET=test/tmp9 |
176 | 83 make check TARGET=test/enum |
214 | 84 make check TARGET=test/obsf |
444 | 85 make check TARGET=test/obsf2 |
221 | 86 make check TARGET=test/long |
307 | 87 make check TARGET=test/tstdarg |
311 | 88 make check TARGET=test/switch |
310 | 89 make check TARGET=test/strinit |
221 | 90 make check TARGET=test/code-gen-all |
338 | 91 make check TARGET=test/bitfield |
92 make check TARGET=test/bitfield1 | |
353 | 93 make check TARGET=test/cext |
400 | 94 make check TARGET=test/const |
438
626d705471d5
Unexecuted code in conditional. Lazy jmp code generation.
kono
parents:
420
diff
changeset
|
95 make check TARGET=test/void_code |
366 | 96 # make check TARGET=test/scope STDFLAG="-std=gnu99" |
172 | 97 #MK =-make |
98 MK= | |
99 check-all-code: | |
100 make check-code$(MK) TARGET=test/arg | |
101 make check-code$(MK) TARGET=test/conv | |
102 make check-code$(MK) TARGET=test/conv1 | |
103 make check-code$(MK) TARGET=test/fact-a | |
104 make check-code$(MK) TARGET=test/fact | |
105 make check-code$(MK) TARGET=test/goto | |
449 | 106 make check-code$(MK) TARGET=test/test1 |
107 make check-code$(MK) TARGET=test/tmp1 | |
172 | 108 make check-code$(MK) TARGET=test/tmp2 |
109 make check-code$(MK) TARGET=test/tmp4 | |
449 | 110 make check-code$(MK) TARGET=test/tmp6 |
366 | 111 make check-code$(MK) TARGET=test/scope |
172 | 112 |
191 | 113 check-nkf: |
114 ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) | |
115 ( cd nkf203; ../mc-$(ARCH) -s nkf.c utf8tbl.c ) | |
116 ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) | |
117 ( cd nkf203; perl test.pl ) | |
118 | |
224 | 119 # -./$(MC) -Itest/ -s $(TARGET).c |
118 | 120 |
245 | 121 check: $(MC) $(TARGET).c |
445 | 122 -gcc $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) |
123 | 123 -./b.out > $(TARGET).gcc.out |
224 | 124 -./$(MC) -s $(TARGET).c |
127 | 125 -gcc $(TARGET).s $(MLIB) |
123 | 126 -./a.out > $(TARGET).$(MC).out |
225 | 127 -diff $(TARGET).gcc.out $(TARGET).$(MC).out |
118 | 128 |
172 | 129 check-code: $(MC) |
130 -./$(MC) -s $(TARGET).c | |
131 -gcc $(TARGET).s $(MLIB) | |
132 -./a.out > $(TARGET).$(MC).out | |
133 -diff $(TARGET).code-out $(TARGET).$(MC).out | |
134 check-code-make: $(MC) | |
135 -./$(MC) -s $(TARGET).c | |
136 -gcc $(TARGET).s $(MLIB) | |
137 -./a.out > $(TARGET).code-out | |
138 | |
245 | 139 test/code-gen-all.c: test/code-gen.pl test/code-gen.c |
140 perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c | |
141 | |
186 | 142 tags: tags-$(ARCH) |
143 | |
144 tags-$(ARCH): | |
145 ctags mc.h mc-code.h mc-code-$(ARCH).c mc-codegen.c mc-codegen.h \ | |
146 mc-parse.c mc-tree.c \ | |
147 conv/c.c conv/c.h \ | |
148 conv/conv.h conv/convdef.h | |
149 | |
0 | 150 tar : |
151 make clean | |
152 tar cBf - . | gzip > ../comp.tgz | |
153 | |
154 depend : | |
67 | 155 makedepend mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \ |
297 | 156 mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ |
328 | 157 mc-macro.c mc-macro.h mc-parse.h \ |
67 | 158 conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \ |
93 | 159 conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h \ |
150 | 160 mc-code-powerpc.c \ |
161 mc-code-mips.c | |
0 | 162 |
163 clean : | |
387 | 164 -rm -f mc mc-ia32 mc-powerpc mc-mips mc-arm *.bak *.s *.o *.cc mc mc1 mc2 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~ *.out */*.out *.i */*.i |
0 | 165 |
327 | 166 mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) |
167 $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o $(CONVERTER) | |
140 | 168 |
327 | 169 mc2 : b00.s b01.s b02.s b03.s mc-macro.o $(CONVERTER) |
170 $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o $(CONVERTER) | |
140 | 171 |
94 | 172 b00.s : mc-parse.c $(MC) |
173 ./$(MC) -s -ob00.s mc-parse.c | |
109 | 174 b01.s : $(CODE) $(MC) |
175 ./$(MC) -s -ob01.s $(CODE) | |
140 | 176 b02.s : mc-codegen.c $(MC) |
177 ./$(MC) -s -ob02.s mc-codegen.c | |
178 b03.s : mc-tree.c $(MC) | |
179 ./$(MC) -s -ob03.s mc-tree.c | |
298 | 180 b04.s : mc-switch.c $(MC) |
181 ./$(MC) -s -ob04.s mc-switch.c | |
140 | 182 |
0 | 183 b10.s : mc-parse.c mc1 |
65 | 184 ./mc1 -s -ob10.s mc-parse.c |
109 | 185 b11.s : $(CODE) $(PRINTF) mc1 |
186 ./mc1 -s -ob11.s $(CODE) | |
140 | 187 b12.s : mc-codegen.c mc1 |
188 ./mc1 -s -ob12.s mc-codegen.c | |
189 b13.s : mc-tree.c mc1 | |
190 ./mc1 -s -ob13.s mc-tree.c | |
298 | 191 b14.s : mc-switch.c mc1 |
192 ./mc1 -s -ob14.s mc-switch.c | |
0 | 193 |
140 | 194 b20.s : mc-parse.c mc2 |
195 ./mc2 -s -ob20.s mc-parse.c | |
196 b21.s : $(CODE) $(PRINTF) mc2 | |
197 ./mc2 -s -ob21.s $(CODE) | |
198 b22.s : mc-codegen.c mc2 | |
199 ./mc2 -s -ob22.s mc-codegen.c | |
200 b23.s : mc-tree.c mc2 | |
201 ./mc2 -s -ob23.s mc-tree.c | |
298 | 202 b24.s : mc-switch.c mc1 |
203 ./mc2 -s -ob24.s mc-switch.c | |
140 | 204 |
298 | 205 diff : b00.s b01.s b02.s b03.s b04.s b10.s b11.s b12.s b13.s b14.s |
0 | 206 -diff b00.s b10.s |
207 -diff b01.s b11.s | |
140 | 208 -diff b02.s b12.s |
209 -diff b03.s b13.s | |
298 | 210 -diff b04.s b14.s |
140 | 211 |
298 | 212 diff2 : b00.s b01.s b02.s b03.s b04.s b20.s b21.s b22.s b23.s b24.s |
140 | 213 -diff b00.s b20.s |
214 -diff b01.s b21.s | |
215 -diff b02.s b22.s | |
216 -diff b03.s b23.s | |
298 | 217 -diff b04.s b24.s |
140 | 218 |
67 | 219 |
0 | 220 # DO NOT DELETE |
221 | |
387 | 222 mc-code-ia32.o: /usr/include/stdio.h /usr/include/sys/types.h |
127 | 223 mc-code-ia32.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
224 mc-code-ia32.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
225 mc-code-ia32.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 226 mc-code-ia32.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
227 mc-code-ia32.o: mc-parse.h mc-codegen.h mc-code.h | |
228 mc-codegen.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 229 mc-codegen.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
230 mc-codegen.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
231 mc-codegen.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 232 mc-codegen.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
233 mc-codegen.o: mc-parse.h mc-codegen.h mc-code.h | |
234 mc-parse.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 235 mc-parse.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
236 mc-parse.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
237 mc-parse.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 238 mc-parse.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
239 mc-parse.o: mc-parse.h mc-codegen.h mc-switch.h mc-macro.h conv/conv.h | |
240 mc-tree.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 241 mc-tree.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
242 mc-tree.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
243 mc-tree.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 244 mc-tree.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
245 mc-tree.o: mc-parse.h | |
246 mc-switch.o: /usr/include/stdio.h /usr/include/sys/types.h | |
298 | 247 mc-switch.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
248 mc-switch.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
249 mc-switch.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 250 mc-switch.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
251 mc-switch.o: mc-parse.h mc-codegen.h mc-code.h | |
252 mc-macro.o: /usr/include/stdio.h /usr/include/sys/types.h | |
253 mc-macro.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h | |
254 mc-macro.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
255 mc-macro.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
256 mc-macro.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h | |
257 mc-macro.o: mc-parse.h mc-macro.h mc-code.h | |
258 conv/c.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 259 conv/c.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
260 conv/c.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
261 conv/c.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 262 conv/c.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
263 conv/c.o: mc-parse.h conv/conv.h conv/convdef.h conv/c.h | |
264 conv/c2cbc.o: mc.h | |
265 conv/cbc2c.o: mc.h | |
266 conv/null.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 267 conv/null.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
268 conv/null.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
269 conv/null.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 270 conv/null.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
271 conv/null.o: mc-parse.h conv/conv.h conv/convdef.h conv/null.h | |
272 mc-code-powerpc.o: /usr/include/stdio.h /usr/include/sys/types.h | |
127 | 273 mc-code-powerpc.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
274 mc-code-powerpc.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
275 mc-code-powerpc.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
276 mc-code-powerpc.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h | |
387 | 277 mc-code-powerpc.o: mc.h mc-parse.h mc-code.h mc-codegen.h |
278 mc-code-mips.o: /usr/include/stdio.h /usr/include/sys/types.h | |
150 | 279 mc-code-mips.o: /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h |
280 mc-code-mips.o: /usr/include/machine/types.h /usr/include/ppc/types.h | |
281 mc-code-mips.o: /usr/include/machine/ansi.h /usr/include/ppc/ansi.h | |
387 | 282 mc-code-mips.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h mc.h |
283 mc-code-mips.o: mc-parse.h mc-code.h mc-codegen.h |