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