Mercurial > hg > CbC > old > device
annotate Makefile.i64 @ 884:f915d5ba033e
struct init in function argument in parse_mode fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 05 Apr 2014 19:37:34 +0900 |
parents | 3976dc54ec3d |
children | 08dcc3b7c39b |
rev | line source |
---|---|
861 | 1 GCC = clang |
804 | 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 | |
861 | 69 mc-include.c: stdio.h |
804 | 70 perl tools/find-gcc-include-path -l $(CC) > mc-include.c |
71 | |
861 | 72 stdio.h: |
73 perl tools/find-gcc-include-path -s $(CC) > stdio.h | |
74 | |
804 | 75 mc.h-new: |
76 perl tools/mc-h-renum.pl mc.h > mc.h.1 | |
77 mv mc.h.1 mc.h | |
78 | |
79 check-all: check-all-c check-all-code | |
80 | |
81 check-all-c: | |
82 make check TARGET=test/basic | |
83 make check-inline TARGET=test/basic | |
84 make check TARGET=test/call | |
85 make check TARGET=test/fact0 | |
86 make check TARGET=test/float | |
87 make check TARGET=test/ifdef | |
88 make check TARGET=test/int | |
89 make check TARGET=test/macro | |
90 make check TARGET=test/regargs | |
91 make check TARGET=test/short | |
92 make check TARGET=test/simp | |
93 make check TARGET=test/simp0 | |
94 make check TARGET=test/simp1 | |
95 make check TARGET=test/static | |
96 make check-inline TARGET=test/static | |
97 make check TARGET=test/tmp | |
98 make check TARGET=test/tmp10 | |
99 make check TARGET=test/tmp11 | |
100 make check TARGET=test/tmp12 | |
101 make check TARGET=test/tmp5 | |
102 make check TARGET=test/tmp7 | |
103 make check-inline TARGET=test/tmp7 | |
104 make check TARGET=test/tmp8 | |
105 make check TARGET=test/tmp9 | |
106 make check TARGET=test/enum | |
107 make check TARGET=test/obsf | |
108 make check TARGET=test/obsf2 | |
109 make check TARGET=test/long | |
110 make check TARGET=test/tstdarg | |
111 make check TARGET=test/switch | |
112 make check-inline TARGET=test/switch | |
113 make check TARGET=test/strinit | |
114 make check-inline TARGET=test/strinit | |
115 make check TARGET=test/code-gen-all | |
116 make check-inline TARGET=test/code-gen-all | |
117 make check TARGET=test/bitfield | |
118 make check TARGET=test/bitfield1 | |
119 make check-inline TARGET=test/bitfield1 | |
120 make check TARGET=test/cext | |
121 make check TARGET=test/const | |
122 make check TARGET=test/void_code | |
123 make check TARGET=test/putenemy | |
124 make check TARGET=test/inline | |
125 make check TARGET=test/ps2 | |
126 make check-inline TARGET=test/ps2 | |
127 make check TARGET=test/offset | |
128 make check TARGET=test/multi | |
129 make check-inline TARGET=test/multi | |
130 make check TARGET=test/comp | |
131 make check-inline TARGET=test/comp | |
132 # make check TARGET=test/scope STDFLAG="-std=gnu99" | |
133 # make check-inline TARGET=test/scope STDFLAG="-std=gnu99" | |
134 #MK =-make | |
135 MK= | |
136 check-all-code: | |
137 make check-code$(MK) TARGET=test/arg | |
138 make check-code$(MK) TARGET=test/conv | |
139 make check-code$(MK) TARGET=test/conv1 | |
140 make check-code$(MK) TARGET=test/fact-a | |
141 make check-code$(MK) TARGET=test/fact | |
142 make check-code$(MK) TARGET=test/goto | |
143 make check-code$(MK) TARGET=test/test1 | |
144 make check-code$(MK) TARGET=test/test2 | |
145 make check-code$(MK) TARGET=test/tmpa | |
146 make check-code$(MK) TARGET=test/tmp1 | |
147 make check-code$(MK) TARGET=test/tmp2 | |
148 make check-code$(MK) TARGET=test/tmp4 | |
149 make check-code$(MK) TARGET=test/tmp6 | |
150 make check-code$(MK) TARGET=test/tmpb | |
151 make check-code-inline TARGET=test/tmpb | |
152 make check-code$(MK) TARGET=test/scope | |
153 make check-code-inline TARGET=test/scope | |
154 # make check-code$(MK) TARGET=test/throw | |
155 make check-code$(MK) TARGET=test/too-long-argument | |
156 | |
157 check-nkf: mc | |
158 ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) | |
862 | 159 ( cd nkf203; ../mc-$(ARCH) nkf.c utf8tbl.c ) |
804 | 160 ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) |
161 ( cd nkf203; perl test.pl ) | |
162 | |
862 | 163 # -./$(MC) -Itest/ $(TARGET).c |
804 | 164 |
165 check: mc $(MC) $(TARGET).c | |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
166 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \ |
882 | 167 -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow \ |
168 -Wno-unused-value | |
804 | 169 -./b.out > $(TARGET).gcc.out |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
170 -./$(MC) $(MCFLAG) $(TARGET).c |
804 | 171 -$(CC) $(TARGET).s $(MLIB) |
172 -./a.out > $(TARGET).$(MC).out | |
173 -diff $(TARGET).gcc.out $(TARGET).$(MC).out | |
174 | |
175 check-inline: mc $(MC) $(TARGET).c | |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
176 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \ |
882 | 177 -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow \ |
178 -Wno-unused-value | |
804 | 179 -./b.out > $(TARGET).gcc.out |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
180 -./$(MC) $(MCFLAG) -DINLINE=inline $(TARGET).c |
804 | 181 -$(CC) $(TARGET).s $(MLIB) |
182 -./a.out > $(TARGET).$(MC).out | |
183 -diff $(TARGET).gcc.out $(TARGET).$(MC).out | |
184 | |
185 check-code: mc $(MC) | |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
186 -./$(MC) $(MCFLAG) $(TARGET).c |
804 | 187 -$(CC) $(TARGET).s $(MLIB) |
188 -./a.out > $(TARGET).$(MC).out | |
189 -diff $(TARGET).code-out $(TARGET).$(MC).out | |
190 check-code-inline: mc $(MC) | |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
191 -./$(MC) $(MCFLAG) -DINLINE=inline $(TARGET).c |
804 | 192 -$(CC) $(TARGET).s $(MLIB) |
193 -./a.out > $(TARGET).$(MC).out | |
194 -diff $(TARGET).code-out $(TARGET).$(MC).out | |
195 check-code-make: mc $(MC) | |
868
c55337499f96
remove warnings and error from test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
862
diff
changeset
|
196 -./$(MC) $(MCFLAG) $(TARGET).c |
804 | 197 -$(CC) $(TARGET).s $(MLIB) |
198 -./a.out > $(TARGET).code-out | |
199 | |
200 check-flip: mc $(MC) | |
201 -$(CC) -DFLIP -c test/basic2.c | |
202 -$(CC) basic2.o test/basic2.c | |
203 ./a.out | |
862 | 204 -./$(MC) test/basic2.c |
804 | 205 -$(CC) test/basic2.s -DFLIP test/basic2.c |
206 ./a.out | |
862 | 207 -./$(MC) -DFLIP test/basic2.c |
804 | 208 -$(CC) test/basic2.s test/basic2.c |
209 ./a.out | |
210 | |
211 test/code-gen-all.c: test/code-gen.pl test/code-gen.c | |
212 perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c | |
213 | |
214 incpri: | |
215 perl tools/incpri.pl test/*.c | |
216 | |
217 tags: tags-$(ARCH) | |
218 | |
219 tags-$(ARCH): | |
861 | 220 ctags -w mc.h mc-code.h mc-code-$(ARCH).c mc-codegen.c mc-codegen.h \ |
804 | 221 mc-parse.h mc-tree.c mc-inline.h mc-switch.h \ |
222 mc-macro.h mc-macro.c \ | |
223 conv/c.c conv/c.h \ | |
224 conv/conv.h conv/convdef.h | |
225 | |
226 tar : | |
227 make clean | |
228 tar cBf - . | gzip > ../comp.tgz | |
229 | |
230 depend : mc.h mc-include.c | |
231 makedepend -I$(GCC_INCLUDE) mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \ | |
232 mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ | |
233 mc-inline.c mc-macro.c mc-macro.h mc-parse.h \ | |
234 conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \ | |
235 conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h \ | |
236 mc-code-arm.c \ | |
237 mc-code-powerpc.c \ | |
238 mc-code-mips.c | |
239 | |
240 clean : | |
861 | 241 -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 stdio.h |
804 | 242 |
243 mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) | |
244 $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) | |
245 | |
246 mc2 : b00.s b01.s b02.s b03.s mc-macro.o mc-inline.o $(CONVERTER) | |
247 $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) | |
248 | |
249 b00.s : mc-parse.c $(MC) | |
862 | 250 ./$(MC) $(MCFLAG) -ob00.s mc-parse.c |
804 | 251 b01.s : $(CODE) $(MC) |
862 | 252 ./$(MC) $(MCFLAG) -ob01.s $(CODE) |
804 | 253 b02.s : mc-codegen.c $(MC) |
862 | 254 ./$(MC) $(MCFLAG) -ob02.s mc-codegen.c |
804 | 255 b03.s : mc-tree.c $(MC) |
862 | 256 ./$(MC) $(MCFLAG) -ob03.s mc-tree.c |
804 | 257 b04.s : mc-switch.c $(MC) |
862 | 258 ./$(MC) $(MCFLAG) -ob04.s mc-switch.c |
804 | 259 |
260 b10.s : mc-parse.c mc1 | |
862 | 261 ./mc1 $(MCFLAG) -ob10.s mc-parse.c |
804 | 262 b11.s : $(CODE) $(PRINTF) mc1 |
862 | 263 ./mc1 $(MCFLAG) -ob11.s $(CODE) |
804 | 264 b12.s : mc-codegen.c mc1 |
862 | 265 ./mc1 $(MCFLAG) -ob12.s mc-codegen.c |
804 | 266 b13.s : mc-tree.c mc1 |
862 | 267 ./mc1 $(MCFLAG) -ob13.s mc-tree.c |
804 | 268 b14.s : mc-switch.c mc1 |
862 | 269 ./mc1 $(MCFLAG) -ob14.s mc-switch.c |
804 | 270 |
271 b20.s : mc-parse.c mc2 | |
862 | 272 ./mc2 $(MCFLAG) -ob20.s mc-parse.c |
804 | 273 b21.s : $(CODE) $(PRINTF) mc2 |
862 | 274 ./mc2 $(MCFLAG) -ob21.s $(CODE) |
804 | 275 b22.s : mc-codegen.c mc2 |
862 | 276 ./mc2 $(MCFLAG) -ob22.s mc-codegen.c |
804 | 277 b23.s : mc-tree.c mc2 |
862 | 278 ./mc2 $(MCFLAG) -ob23.s mc-tree.c |
804 | 279 b24.s : mc-switch.c mc1 |
862 | 280 ./mc2 $(MCFLAG) -ob24.s mc-switch.c |
804 | 281 |
282 diff : b00.s b01.s b02.s b03.s b04.s b10.s b11.s b12.s b13.s b14.s | |
283 -diff b00.s b10.s | |
284 -diff b01.s b11.s | |
285 -diff b02.s b12.s | |
286 -diff b03.s b13.s | |
287 -diff b04.s b14.s | |
288 | |
289 diff2 : b00.s b01.s b02.s b03.s b04.s b20.s b21.s b22.s b23.s b24.s | |
290 -diff b00.s b20.s | |
291 -diff b01.s b21.s | |
292 -diff b02.s b22.s | |
293 -diff b03.s b23.s | |
294 -diff b04.s b24.s | |
295 | |
296 | |
297 # DO NOT DELETE |