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