Mercurial > hg > CbC > old > device
annotate Makefile.linuxzaurus @ 597:756ba7c78e4c
converter fix.
author | kono |
---|---|
date | Mon, 23 Jan 2006 14:09:31 +0900 |
parents | cc2a83f98188 |
children | df04bc5fd5fe |
rev | line source |
---|---|
417 | 1 CC = gcc |
2 # -O3 | |
444 | 3 # CFLAGS = -g -Wall -I. |
4 # CFLAGS = -g -Wall -I. -pg -fprofile-arcs -ftest-coverage | |
5 # LDFLAGS = -pg | |
6 # for Linux Zaurus | |
7 CFLAGS = -fsigned-char -pipe -g -I. -I/home/zaurus/develop/include | |
446 | 8 CFLAGS1 = -g -I. -fsigned-char |
417 | 9 BASE=0 |
10 STAGE=1 | |
11 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE) | |
444 | 12 ARCH=arm |
417 | 13 MC=mc-$(ARCH) |
444 | 14 MLIB = -lm |
417 | 15 PRINTF= # printf.c |
16 CONVERTER=conv/c.o conv/null.o | |
17 # conv/c2cbc.o conv/cbc2c.o | |
476 | 18 COMPLIB = mc-parse.o mc-codegen.o mc-switch.o mc-macro.o mc-tree.o mc-inline.o |
417 | 19 # CODE=mc-code-ia32.c |
20 CODE=mc-code-$(ARCH).c | |
444 | 21 # |
22 TARGET=test/simp | |
417 | 23 |
24 all: mc mc-ia32 mc-powerpc mc-mips mc-arm | |
25 | |
26 mc: mc-$(ARCH) | |
27 cp mc-$(ARCH) mc | |
28 | |
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 \ | |
565 | 34 mc-inline.h mc-inline.c \ |
417 | 35 conv/conv.h conv/convdef.h conv/null.c |
36 | |
37 mc-powerpc : mc-code-powerpc.o $(COMPLIB) $(CONVERTER) | |
444 | 38 $(CC) $(LDFLAGS) -g mc-code-powerpc.o $(COMPLIB) $(CONVERTER) -o $@ |
417 | 39 |
40 mc-ia32 : mc-code-ia32.o $(COMPLIB) $(CONVERTER) | |
444 | 41 $(CC) $(LDFLAGS) -g mc-code-ia32.o $(COMPLIB) $(CONVERTER) -o $@ |
417 | 42 |
43 mc-mips : mc-code-mips.o $(COMPLIB) $(CONVERTER) | |
444 | 44 $(CC) $(LDFLAGS) -g mc-code-mips.o $(COMPLIB) $(CONVERTER) -o $@ |
417 | 45 |
46 mc-arm : mc-code-arm.o $(COMPLIB) $(CONVERTER) | |
444 | 47 $(CC) $(LDFLAGS) -g mc-code-arm.o $(COMPLIB) $(CONVERTER) -o $@ |
417 | 48 |
565 | 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 | |
417 | 55 |
56 mc.h-new: | |
565 | 57 perl tools/mc-h-renum.pl mc.h > mc.h.1 |
417 | 58 mv mc.h.1 mc.h |
59 | |
60 check-all: check-all-c check-all-code | |
61 | |
62 check-all-c: | |
63 make check TARGET=test/basic | |
565 | 64 make check-inline TARGET=test/basic |
417 | 65 make check TARGET=test/call |
66 make check TARGET=test/fact0 | |
67 make check TARGET=test/float | |
68 make check TARGET=test/ifdef | |
69 make check TARGET=test/int | |
70 make check TARGET=test/macro | |
71 make check TARGET=test/regargs | |
72 make check TARGET=test/short | |
73 make check TARGET=test/simp | |
74 make check TARGET=test/simp0 | |
75 make check TARGET=test/simp1 | |
76 make check TARGET=test/static | |
77 make check TARGET=test/tmp | |
78 make check TARGET=test/tmp10 | |
79 make check TARGET=test/tmp11 | |
80 make check TARGET=test/tmp12 | |
81 make check TARGET=test/tmp5 | |
82 make check TARGET=test/tmp7 | |
83 make check TARGET=test/tmp8 | |
84 make check TARGET=test/tmp9 | |
85 make check TARGET=test/enum | |
86 make check TARGET=test/obsf | |
444 | 87 make check TARGET=test/obsf2 |
417 | 88 make check TARGET=test/long |
89 make check TARGET=test/tstdarg | |
90 make check TARGET=test/switch | |
91 make check TARGET=test/strinit | |
92 make check TARGET=test/code-gen-all | |
565 | 93 make check-inline TARGET=test/code-gen-all |
417 | 94 make check TARGET=test/bitfield |
95 make check TARGET=test/bitfield1 | |
565 | 96 make check-inline TARGET=test/bitfield1 |
417 | 97 make check TARGET=test/cext |
444 | 98 make check TARGET=test/const |
99 make check TARGET=test/void_code | |
565 | 100 make check TARGET=test/putenemy |
101 make check TARGET=test/inline | |
102 make check TARGET=test/offset | |
417 | 103 # make check TARGET=test/scope STDFLAG="-std=gnu99" |
565 | 104 # make check-inline TARGET=test/scope STDFLAG="-std=gnu99" |
417 | 105 #MK =-make |
106 MK= | |
107 check-all-code: | |
108 make check-code$(MK) TARGET=test/arg | |
109 make check-code$(MK) TARGET=test/conv | |
110 make check-code$(MK) TARGET=test/conv1 | |
111 make check-code$(MK) TARGET=test/fact-a | |
112 make check-code$(MK) TARGET=test/fact | |
113 make check-code$(MK) TARGET=test/goto | |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
446
diff
changeset
|
114 make check-code$(MK) TARGET=test/test1 |
565 | 115 make check-code$(MK) TARGET=test/tmpa |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
446
diff
changeset
|
116 make check-code$(MK) TARGET=test/tmp1 |
417 | 117 make check-code$(MK) TARGET=test/tmp2 |
118 make check-code$(MK) TARGET=test/tmp4 | |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
446
diff
changeset
|
119 make check-code$(MK) TARGET=test/tmp6 |
590 | 120 make check-code$(MK) TARGET=test/tmpb |
417 | 121 make check-code$(MK) TARGET=test/scope |
581 | 122 make check-code$(MK) TARGET=test/throw |
565 | 123 make check-code$(MK) TARGET=test/too-long-argument |
417 | 124 |
125 check-nkf: | |
565 | 126 ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) |
417 | 127 ( cd nkf203; ../mc-$(ARCH) -s nkf.c utf8tbl.c ) |
128 ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) | |
129 ( cd nkf203; perl test.pl ) | |
130 | |
131 # -./$(MC) -Itest/ -s $(TARGET).c | |
132 | |
565 | 133 check: mc $(MC) $(TARGET).c |
134 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) | |
417 | 135 -./b.out > $(TARGET).gcc.out |
136 -./$(MC) -s $(TARGET).c | |
565 | 137 -$(CC) $(TARGET).s $(MLIB) |
417 | 138 -./a.out > $(TARGET).$(MC).out |
139 -diff $(TARGET).gcc.out $(TARGET).$(MC).out | |
140 | |
565 | 141 check-inline: mc $(MC) $(TARGET).c |
142 -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) | |
143 -./b.out > $(TARGET).gcc.out | |
144 -./$(MC) -s -DINLINE=inline $(TARGET).c | |
145 -$(CC) $(TARGET).s $(MLIB) | |
146 -./a.out > $(TARGET).$(MC).out | |
147 -diff $(TARGET).gcc.out $(TARGET).$(MC).out | |
148 | |
149 check-code: mc $(MC) | |
417 | 150 -./$(MC) -s $(TARGET).c |
565 | 151 -$(CC) $(TARGET).s $(MLIB) |
417 | 152 -./a.out > $(TARGET).$(MC).out |
153 -diff $(TARGET).code-out $(TARGET).$(MC).out | |
565 | 154 check-code-make: mc $(MC) |
417 | 155 -./$(MC) -s $(TARGET).c |
565 | 156 -$(CC) $(TARGET).s $(MLIB) |
417 | 157 -./a.out > $(TARGET).code-out |
158 | |
159 test/code-gen-all.c: test/code-gen.pl test/code-gen.c | |
160 perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c | |
161 | |
565 | 162 incpri: |
163 perl tools/incpri.pl test/*.c | |
164 | |
417 | 165 tags: tags-$(ARCH) |
166 | |
167 tags-$(ARCH): | |
168 ctags mc.h mc-code.h mc-code-$(ARCH).c mc-codegen.c mc-codegen.h \ | |
169 mc-parse.c mc-tree.c \ | |
170 conv/c.c conv/c.h \ | |
171 conv/conv.h conv/convdef.h | |
172 | |
173 tar : | |
174 make clean | |
175 tar cBf - . | gzip > ../comp.tgz | |
176 | |
177 depend : | |
178 makedepend mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \ | |
179 mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ | |
180 mc-macro.c mc-macro.h mc-parse.h \ | |
181 conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \ | |
182 conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h \ | |
183 mc-code-powerpc.c \ | |
184 mc-code-mips.c | |
185 | |
186 clean : | |
187 -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 | |
188 | |
476 | 189 mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) |
190 $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) | |
417 | 191 |
476 | 192 mc2 : b00.s b01.s b02.s b03.s mc-macro.o mc-inline.o $(CONVERTER) |
193 $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) | |
417 | 194 |
195 b00.s : mc-parse.c $(MC) | |
196 ./$(MC) -s -ob00.s mc-parse.c | |
197 b01.s : $(CODE) $(MC) | |
198 ./$(MC) -s -ob01.s $(CODE) | |
199 b02.s : mc-codegen.c $(MC) | |
200 ./$(MC) -s -ob02.s mc-codegen.c | |
201 b03.s : mc-tree.c $(MC) | |
202 ./$(MC) -s -ob03.s mc-tree.c | |
203 b04.s : mc-switch.c $(MC) | |
204 ./$(MC) -s -ob04.s mc-switch.c | |
205 | |
206 b10.s : mc-parse.c mc1 | |
207 ./mc1 -s -ob10.s mc-parse.c | |
208 b11.s : $(CODE) $(PRINTF) mc1 | |
209 ./mc1 -s -ob11.s $(CODE) | |
210 b12.s : mc-codegen.c mc1 | |
211 ./mc1 -s -ob12.s mc-codegen.c | |
212 b13.s : mc-tree.c mc1 | |
213 ./mc1 -s -ob13.s mc-tree.c | |
214 b14.s : mc-switch.c mc1 | |
215 ./mc1 -s -ob14.s mc-switch.c | |
216 | |
217 b20.s : mc-parse.c mc2 | |
218 ./mc2 -s -ob20.s mc-parse.c | |
219 b21.s : $(CODE) $(PRINTF) mc2 | |
220 ./mc2 -s -ob21.s $(CODE) | |
221 b22.s : mc-codegen.c mc2 | |
222 ./mc2 -s -ob22.s mc-codegen.c | |
223 b23.s : mc-tree.c mc2 | |
224 ./mc2 -s -ob23.s mc-tree.c | |
225 b24.s : mc-switch.c mc1 | |
226 ./mc2 -s -ob24.s mc-switch.c | |
227 | |
228 diff : b00.s b01.s b02.s b03.s b04.s b10.s b11.s b12.s b13.s b14.s | |
229 -diff b00.s b10.s | |
230 -diff b01.s b11.s | |
231 -diff b02.s b12.s | |
232 -diff b03.s b13.s | |
233 -diff b04.s b14.s | |
234 | |
235 diff2 : b00.s b01.s b02.s b03.s b04.s b20.s b21.s b22.s b23.s b24.s | |
236 -diff b00.s b20.s | |
237 -diff b01.s b21.s | |
238 -diff b02.s b22.s | |
239 -diff b03.s b23.s | |
240 -diff b04.s b24.s | |
241 | |
242 | |
446 | 243 # DO NOT DELETE |