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