Mercurial > hg > CbC > old > device
annotate Makefile @ 935:7672a37e7545 default tip
Raspbery PI ARM support begin
author | kono |
---|---|
date | Sat, 24 Dec 2016 03:02:57 +0000 |
parents | b7f4ff38a3bf |
children |
rev | line source |
---|---|
935 | 1 CC = gcc |
664 | 2 # -O3 |
836
a760656224fa
parse mode diff is not worked yet...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
818
diff
changeset
|
3 # MCFLAG = -DUSE_CODE_KEYWORD |
934
b7f4ff38a3bf
add -Wno-nullability-completeness
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
933
diff
changeset
|
4 CFLAGS = -g -Wall -Wno-nullability-completeness -I. $(MCFLAG) # -O |
440 | 5 # CFLAGS = -g -Wall -I. -pg -fprofile-arcs -ftest-coverage |
6 # LDFLAGS = -pg | |
407 | 7 # for Linux Zaurus |
935 | 8 CFLAGS = -fsigned-char -pipe -g -I. -I/home/zaurus/develop/include -DUSE_CODE_KEYWORD |
9 CFLAGS1 = -g -pipe -I. -fsigned-char -DUSE_CODE_KEYWORD | |
0 | 10 BASE=0 |
11 STAGE=1 | |
12 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE) | |
935 | 13 ARCH=arm |
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 |
420 | 21 # |
22 TARGET=test/simp | |
93 | 23 |
935 | 24 all: mc |
690 | 25 |
935 | 26 mc: mc-include.c mc-$(ARCH) |
126 | 27 cp mc-$(ARCH) mc |
0 | 28 |
935 | 29 TAGS: |
30 ctags mc-code-powerpc.c mc-code.h mc-codegen.c mc-codegen.h \ | |
31 mc-macro.c \ | |
32 mc-parse.c mc-tree.c mc-switch.c mc-switch.h \ | |
33 mc.h conv/c.c conv/c.h \ | |
34 mc-inline.h mc-inline.c \ | |
35 conv/conv.h conv/convdef.h conv/null.c | |
731 | 36 |
935 | 37 mc-powerpc : mc-code-powerpc.o $(COMPLIB) $(CONVERTER) |
440 | 38 $(CC) $(LDFLAGS) -g mc-code-powerpc.o $(COMPLIB) $(CONVERTER) -o $@ |
94 | 39 |
935 | 40 mc-ia32 : mc-code-ia32.o $(COMPLIB) $(CONVERTER) |
440 | 41 $(CC) $(LDFLAGS) -g mc-code-ia32.o $(COMPLIB) $(CONVERTER) -o $@ |
61 | 42 |
935 | 43 mc-mips : mc-code-mips.o $(COMPLIB) $(CONVERTER) |
440 | 44 $(CC) $(LDFLAGS) -g mc-code-mips.o $(COMPLIB) $(CONVERTER) -o $@ |
130 | 45 |
935 | 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 |
935 | 56 mc-include.c: |
615 | 57 perl tools/find-gcc-include-path -l $(CC) > mc-include.c |
58 | |
166 | 59 mc.h-new: |
466 | 60 perl tools/mc-h-renum.pl mc.h > mc.h.1 |
166 | 61 mv mc.h.1 mc.h |
62 | |
172 | 63 check-all: check-all-c check-all-code |
64 | |
65 check-all-c: | |
118 | 66 make check TARGET=test/basic |
550 | 67 make check-inline TARGET=test/basic |
118 | 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 | |
172 | 75 make check TARGET=test/short |
118 | 76 make check TARGET=test/simp |
77 make check TARGET=test/simp0 | |
249 | 78 make check TARGET=test/simp1 |
172 | 79 make check TARGET=test/static |
118 | 80 make check TARGET=test/tmp |
81 make check TARGET=test/tmp10 | |
82 make check TARGET=test/tmp11 | |
161 | 83 make check TARGET=test/tmp12 |
336 | 84 make check TARGET=test/tmp5 |
118 | 85 make check TARGET=test/tmp7 |
664 | 86 make check TARGET=test/tmp8 |
118 | 87 make check TARGET=test/tmp9 |
176 | 88 make check TARGET=test/enum |
214 | 89 make check TARGET=test/obsf |
444 | 90 make check TARGET=test/obsf2 |
221 | 91 make check TARGET=test/long |
307 | 92 make check TARGET=test/tstdarg |
311 | 93 make check TARGET=test/switch |
310 | 94 make check TARGET=test/strinit |
221 | 95 make check TARGET=test/code-gen-all |
550 | 96 make check-inline TARGET=test/code-gen-all |
338 | 97 make check TARGET=test/bitfield |
98 make check TARGET=test/bitfield1 | |
705 | 99 make check-inline TARGET=test/bitfield1 |
353 | 100 make check TARGET=test/cext |
400 | 101 make check TARGET=test/const |
438
626d705471d5
Unexecuted code in conditional. Lazy jmp code generation.
kono
parents:
420
diff
changeset
|
102 make check TARGET=test/void_code |
494 | 103 make check TARGET=test/putenemy |
453 | 104 make check TARGET=test/inline |
935 | 105 make check TARGET=test/offset |
640 | 106 make check TARGET=test/ps2 |
107 make check TARGET=test/multi | |
366 | 108 # make check TARGET=test/scope STDFLAG="-std=gnu99" |
550 | 109 # make check-inline TARGET=test/scope STDFLAG="-std=gnu99" |
172 | 110 #MK =-make |
111 MK= | |
112 check-all-code: | |
113 make check-code$(MK) TARGET=test/arg | |
114 make check-code$(MK) TARGET=test/conv | |
115 make check-code$(MK) TARGET=test/conv1 | |
116 make check-code$(MK) TARGET=test/fact-a | |
117 make check-code$(MK) TARGET=test/fact | |
118 make check-code$(MK) TARGET=test/goto | |
449 | 119 make check-code$(MK) TARGET=test/test1 |
664 | 120 make check-code$(MK) TARGET=test/test2 |
477 | 121 make check-code$(MK) TARGET=test/tmpa |
449 | 122 make check-code$(MK) TARGET=test/tmp1 |
172 | 123 make check-code$(MK) TARGET=test/tmp2 |
124 make check-code$(MK) TARGET=test/tmp4 | |
449 | 125 make check-code$(MK) TARGET=test/tmp6 |
664 | 126 make check-code$(MK) TARGET=test/tmpb |
366 | 127 make check-code$(MK) TARGET=test/scope |
935 | 128 make check-code$(MK) TARGET=test/throw |
545 | 129 make check-code$(MK) TARGET=test/too-long-argument |
172 | 130 |
935 | 131 check-nkf: |
191 | 132 ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) |
935 | 133 ( cd nkf203; ../mc-$(ARCH) -s nkf.c utf8tbl.c ) |
191 | 134 ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) |
135 ( cd nkf203; perl test.pl ) | |
862 | 136 # -./$(MC) -Itest/ $(TARGET).c |
118 | 137 |
922 | 138 ifeq ($(GCC),clang) |
139 NOWARN = -Wno-literal-conversion -Wno-implicit-function-declaration -Wno-implicit-int \ | |
882 | 140 -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-return-type -Wno-bitfield-constant-conversion -Wno-tautological-compare -Wno-shift-overflow \ |
934
b7f4ff38a3bf
add -Wno-nullability-completeness
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
933
diff
changeset
|
141 -Wno-unused-value -Wno-nullability-completeness |
919 | 142 endif |
143 | |
144 check: mc $(MC) $(TARGET).c | |
935 | 145 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) |
123 | 146 -./b.out > $(TARGET).gcc.out |
935 | 147 -./$(MC) -s $(TARGET).c |
466 | 148 -$(CC) $(TARGET).s $(MLIB) |
123 | 149 -./a.out > $(TARGET).$(MC).out |
225 | 150 -diff $(TARGET).gcc.out $(TARGET).$(MC).out |
118 | 151 |
551 | 152 check-inline: mc $(MC) $(TARGET).c |
935 | 153 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) |
550 | 154 -./b.out > $(TARGET).gcc.out |
935 | 155 -./$(MC) -s -DINLINE=inline $(TARGET).c |
550 | 156 -$(CC) $(TARGET).s $(MLIB) |
157 -./a.out > $(TARGET).$(MC).out | |
158 -diff $(TARGET).gcc.out $(TARGET).$(MC).out | |
159 | |
551 | 160 check-code: mc $(MC) |
935 | 161 -./$(MC) -s $(TARGET).c |
705 | 162 -$(CC) $(TARGET).s $(MLIB) |
163 -./a.out > $(TARGET).$(MC).out | |
164 -diff $(TARGET).code-out $(TARGET).$(MC).out | |
551 | 165 check-code-make: mc $(MC) |
935 | 166 -./$(MC) -s $(TARGET).c |
466 | 167 -$(CC) $(TARGET).s $(MLIB) |
172 | 168 -./a.out > $(TARGET).code-out |
169 | |
245 | 170 test/code-gen-all.c: test/code-gen.pl test/code-gen.c |
171 perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c | |
172 | |
491 | 173 incpri: |
174 perl tools/incpri.pl test/*.c | |
175 | |
935 | 176 tags: tags-$(ARCH) |
186 | 177 |
178 tags-$(ARCH): | |
935 | 179 ctags mc.h mc-code.h mc-code-$(ARCH).c mc-codegen.c mc-codegen.h \ |
180 mc-parse.c mc-tree.c \ | |
186 | 181 conv/c.c conv/c.h \ |
182 conv/conv.h conv/convdef.h | |
183 | |
0 | 184 tar : |
185 make clean | |
186 tar cBf - . | gzip > ../comp.tgz | |
187 | |
935 | 188 depend : mc-include.c |
189 makedepend mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \ | |
664 | 190 mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ |
191 mc-inline.c mc-macro.c mc-macro.h mc-parse.h \ | |
67 | 192 conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \ |
93 | 193 conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h \ |
664 | 194 mc-code-arm.c \ |
195 mc-code-powerpc.c \ | |
196 mc-code-mips.c | |
0 | 197 |
198 clean : | |
935 | 199 -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 mc-include.h |
0 | 200 |
453 | 201 mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) |
202 $(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 | 203 |
453 | 204 mc2 : b00.s b01.s b02.s b03.s mc-macro.o mc-inline.o $(CONVERTER) |
205 $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) | |
140 | 206 |
94 | 207 b00.s : mc-parse.c $(MC) |
935 | 208 ./$(MC) -s -ob00.s mc-parse.c |
109 | 209 b01.s : $(CODE) $(MC) |
935 | 210 ./$(MC) -s -ob01.s $(CODE) |
140 | 211 b02.s : mc-codegen.c $(MC) |
935 | 212 ./$(MC) -s -ob02.s mc-codegen.c |
140 | 213 b03.s : mc-tree.c $(MC) |
935 | 214 ./$(MC) -s -ob03.s mc-tree.c |
298 | 215 b04.s : mc-switch.c $(MC) |
935 | 216 ./$(MC) -s -ob04.s mc-switch.c |
140 | 217 |
0 | 218 b10.s : mc-parse.c mc1 |
935 | 219 ./mc1 -s -ob10.s mc-parse.c |
109 | 220 b11.s : $(CODE) $(PRINTF) mc1 |
935 | 221 ./mc1 -s -ob11.s $(CODE) |
140 | 222 b12.s : mc-codegen.c mc1 |
935 | 223 ./mc1 -s -ob12.s mc-codegen.c |
140 | 224 b13.s : mc-tree.c mc1 |
935 | 225 ./mc1 -s -ob13.s mc-tree.c |
298 | 226 b14.s : mc-switch.c mc1 |
935 | 227 ./mc1 -s -ob14.s mc-switch.c |
0 | 228 |
140 | 229 b20.s : mc-parse.c mc2 |
935 | 230 ./mc2 -s -ob20.s mc-parse.c |
140 | 231 b21.s : $(CODE) $(PRINTF) mc2 |
935 | 232 ./mc2 -s -ob21.s $(CODE) |
140 | 233 b22.s : mc-codegen.c mc2 |
935 | 234 ./mc2 -s -ob22.s mc-codegen.c |
140 | 235 b23.s : mc-tree.c mc2 |
935 | 236 ./mc2 -s -ob23.s mc-tree.c |
298 | 237 b24.s : mc-switch.c mc1 |
935 | 238 ./mc2 -s -ob24.s mc-switch.c |
140 | 239 |
298 | 240 diff : b00.s b01.s b02.s b03.s b04.s b10.s b11.s b12.s b13.s b14.s |
0 | 241 -diff b00.s b10.s |
242 -diff b01.s b11.s | |
140 | 243 -diff b02.s b12.s |
244 -diff b03.s b13.s | |
298 | 245 -diff b04.s b14.s |
140 | 246 |
298 | 247 diff2 : b00.s b01.s b02.s b03.s b04.s b20.s b21.s b22.s b23.s b24.s |
140 | 248 -diff b00.s b20.s |
249 -diff b01.s b21.s | |
250 -diff b02.s b22.s | |
251 -diff b03.s b23.s | |
298 | 252 -diff b04.s b24.s |
140 | 253 |
67 | 254 |
0 | 255 # DO NOT DELETE |