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