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