Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | ## Process this file with automake to generate Makefile.in |
2 | ||
a5c7551f | 3 | AUTOMAKE_OPTIONS = 1.11 dejagnu foreign no-dist |
79887925 | 4 | ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd |
252b5132 RH |
5 | |
6 | SUBDIRS = doc po | |
7 | ||
8 | tooldir = $(exec_prefix)/$(target_alias) | |
9 | ||
9c46fb1b AM |
10 | YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` |
11 | LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` | |
252b5132 | 12 | |
6008641e DJ |
13 | # We have to set this, because autoconf 2.59 does not substitute YFLAGS. |
14 | # Autoconf 2.61 does, so this can be removed when we upgrade. | |
15 | YFLAGS = | |
16 | ||
a2d91340 | 17 | WARN_CFLAGS = @WARN_CFLAGS@ |
9e9b66a9 | 18 | NO_WERROR = @NO_WERROR@ |
a2d91340 AC |
19 | AM_CFLAGS = $(WARN_CFLAGS) |
20 | ||
252b5132 RH |
21 | TARG_CPU = @target_cpu_type@ |
22 | TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c | |
23 | TARG_CPU_O = tc-@target_cpu_type@.o | |
24 | TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h | |
25 | OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c | |
26 | OBJ_FORMAT_O = obj-@obj_format@.o | |
27 | OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h | |
28 | TARG_ENV_H = $(srcdir)/config/te-@te_file@.h | |
29 | ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c | |
30 | ATOF_TARG_O = atof-@atof@.o | |
31 | ||
32 | # use @target_cpu_type@ for refering to configured target name | |
12e64c2c | 33 | IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h |
252b5132 RH |
34 | IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c |
35 | IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h | |
36 | IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o | |
37 | ||
38 | # CPU types. This is only used for dependency information. | |
39 | ||
40 | CPU_TYPES = \ | |
252b5132 RH |
41 | alpha \ |
42 | arc \ | |
43 | arm \ | |
ec694b89 | 44 | avr \ |
07c1b327 | 45 | bfin \ |
3d3d428f | 46 | cr16 \ |
3bcbcc3d | 47 | cris \ |
1fe1f39c | 48 | crx \ |
252b5132 RH |
49 | d10v \ |
50 | d30v \ | |
d172d4ba | 51 | dlx \ |
252b5132 | 52 | fr30 \ |
0ebb9a87 | 53 | frv \ |
252b5132 | 54 | h8300 \ |
252b5132 | 55 | hppa \ |
5b93d8bb | 56 | i370 \ |
252b5132 RH |
57 | i386 \ |
58 | i860 \ | |
59 | i960 \ | |
f26a5955 | 60 | ia64 \ |
a40cbfa3 | 61 | ip2k \ |
84e94c90 | 62 | lm32 \ |
49f58d10 | 63 | m32c \ |
252b5132 | 64 | m32r \ |
60bcf0fa | 65 | m68hc11 \ |
252b5132 | 66 | m68k \ |
f26a5955 | 67 | maxq \ |
252b5132 | 68 | mcore \ |
280d71bf | 69 | mep \ |
7ba29e2a | 70 | microblaze \ |
252b5132 | 71 | mips \ |
3c3bdf30 | 72 | mmix \ |
252b5132 RH |
73 | mn10200 \ |
74 | mn10300 \ | |
2469cfa2 | 75 | msp430 \ |
f26a5955 | 76 | mt \ |
252b5132 | 77 | ns32k \ |
c7e40348 | 78 | openrisc \ |
3b16e843 | 79 | or32 \ |
e135f41b | 80 | pdp11 \ |
041dd5a9 | 81 | pj \ |
252b5132 | 82 | ppc \ |
a85d7ed0 | 83 | s390 \ |
1c0d3aa6 | 84 | score \ |
252b5132 | 85 | sh \ |
eb1e0e80 | 86 | sh64 \ |
252b5132 | 87 | sparc \ |
e9f53129 | 88 | spu \ |
252b5132 | 89 | tic30 \ |
98199d8f | 90 | tic4x \ |
39bec121 | 91 | tic54x \ |
252b5132 | 92 | v850 \ |
f26a5955 | 93 | vax \ |
d70c5fc7 | 94 | xc16x \ |
f26a5955 | 95 | xstormy16 \ |
e0001a05 | 96 | xtensa \ |
3c9b82ba | 97 | z80 \ |
252b5132 RH |
98 | z8k |
99 | ||
100 | # Object format types. This is only used for dependency information. | |
98aa84af | 101 | # We deliberately omit SOM, since it does not work as a cross assembler. |
252b5132 RH |
102 | |
103 | OBJ_FORMATS = \ | |
104 | aout \ | |
252b5132 RH |
105 | coff \ |
106 | ecoff \ | |
107 | elf \ | |
e57f8c65 TG |
108 | evax \ |
109 | macho | |
252b5132 RH |
110 | |
111 | # This is an sh case which sets valid according to whether the CPU | |
112 | # type in the shell variable c and the OS type in the shell variable o | |
113 | # are supported. This helps cuts down on the amount of dependency | |
114 | # information. | |
115 | ||
116 | CPU_OBJ_VALID = \ | |
117 | valid= ; \ | |
118 | case $$o in \ | |
119 | aout) \ | |
120 | case $$c in \ | |
7be1c489 | 121 | arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \ |
252b5132 RH |
122 | valid=yes ;; \ |
123 | esac ;; \ | |
f26a5955 | 124 | coff) \ |
43c34dee | 125 | case $$c in \ |
f26a5955 AM |
126 | arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \ |
127 | | ppc | sh | sparc | tic* | xscale | z80 | z8k) \ | |
128 | valid=yes ;; \ | |
43c34dee | 129 | esac ;; \ |
252b5132 RH |
130 | ecoff) \ |
131 | case $$c in \ | |
132 | mips | alpha) valid=yes ;; \ | |
133 | esac ;; \ | |
f26a5955 AM |
134 | elf) valid=yes ; \ |
135 | case $$c in \ | |
136 | maxq | ns32k | tic* | z80 | z8k) valid= ;; \ | |
137 | esac ;; \ | |
252b5132 RH |
138 | evax) \ |
139 | case $$c in \ | |
140 | alpha) valid=yes ;; \ | |
141 | esac ;; \ | |
e57f8c65 TG |
142 | macho) \ |
143 | case $$c in \ | |
144 | i386) valid=yes ;; \ | |
145 | esac ;; \ | |
252b5132 RH |
146 | vms) \ |
147 | case $$c in \ | |
148 | vax) valid=yes ;; \ | |
149 | esac ;; \ | |
150 | esac; | |
151 | ||
16adf844 | 152 | # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case. |
252b5132 | 153 | |
3bcbcc3d | 154 | MULTI_CPU_TYPES = i386 mips cris |
16adf844 AM |
155 | |
156 | MULTI_CPU_OBJ_VALID = \ | |
252b5132 | 157 | valid= ; \ |
16adf844 AM |
158 | case $$o in \ |
159 | aout) \ | |
160 | case $$c in \ | |
3bcbcc3d HPN |
161 | i386 | cris) valid=yes ;; \ |
162 | esac ;; \ | |
163 | coff) \ | |
164 | case $$c in \ | |
165 | i386 | mips) valid=yes ;; \ | |
16adf844 | 166 | esac ;; \ |
16adf844 AM |
167 | ecoff) \ |
168 | case $$c in \ | |
169 | mips) valid=yes ;; \ | |
170 | esac ;; \ | |
171 | elf) valid=yes ;; \ | |
252b5132 RH |
172 | esac; |
173 | ||
174 | # Regular source files. | |
175 | ||
176 | GAS_CFILES = \ | |
177 | app.c \ | |
178 | as.c \ | |
179 | atof-generic.c \ | |
252b5132 RH |
180 | cond.c \ |
181 | depend.c \ | |
fac0d250 | 182 | dwarf2dbg.c \ |
54cfded0 | 183 | dw2gencfi.c \ |
252b5132 RH |
184 | ecoff.c \ |
185 | ehopt.c \ | |
186 | expr.c \ | |
187 | flonum-copy.c \ | |
188 | flonum-konst.c \ | |
189 | flonum-mult.c \ | |
190 | frags.c \ | |
191 | hash.c \ | |
192 | input-file.c \ | |
193 | input-scrub.c \ | |
194 | listing.c \ | |
195 | literal.c \ | |
196 | macro.c \ | |
197 | messages.c \ | |
198 | output-file.c \ | |
199 | read.c \ | |
3d6b762c | 200 | remap.c \ |
252b5132 RH |
201 | sb.c \ |
202 | stabs.c \ | |
203 | subsegs.c \ | |
204 | symbols.c \ | |
205 | write.c | |
206 | ||
bd3ba5d1 | 207 | CFILES = $(GAS_CFILES) itbl-ops.c cgen.c |
252b5132 RH |
208 | |
209 | HFILES = \ | |
210 | as.h \ | |
211 | asintl.h \ | |
212 | bignum.h \ | |
213 | bit_fix.h \ | |
214 | cgen.h \ | |
fac0d250 | 215 | dwarf2dbg.h \ |
54cfded0 | 216 | dw2gencfi.h \ |
252b5132 RH |
217 | ecoff.h \ |
218 | emul-target.h \ | |
219 | emul.h \ | |
220 | expr.h \ | |
221 | flonum.h \ | |
222 | frags.h \ | |
223 | hash.h \ | |
224 | input-file.h \ | |
b16b813f | 225 | itbl-lex.h \ |
252b5132 RH |
226 | itbl-ops.h \ |
227 | listing.h \ | |
228 | macro.h \ | |
229 | obj.h \ | |
230 | output-file.h \ | |
231 | read.h \ | |
232 | sb.h \ | |
233 | struc-symbol.h \ | |
234 | subsegs.h \ | |
235 | symbols.h \ | |
236 | tc.h \ | |
237 | write.h | |
238 | ||
239 | # CPU files in config. | |
240 | ||
241 | TARGET_CPU_CFILES = \ | |
252b5132 RH |
242 | config/tc-alpha.c \ |
243 | config/tc-arc.c \ | |
244 | config/tc-arm.c \ | |
ec694b89 | 245 | config/tc-avr.c \ |
07c1b327 | 246 | config/tc-bfin.c \ |
3d3d428f | 247 | config/tc-cr16.c \ |
3bcbcc3d | 248 | config/tc-cris.c \ |
1fe1f39c | 249 | config/tc-crx.c \ |
252b5132 RH |
250 | config/tc-d10v.c \ |
251 | config/tc-d30v.c \ | |
d172d4ba | 252 | config/tc-dlx.c \ |
a4835b42 | 253 | config/tc-fr30.c \ |
0ebb9a87 | 254 | config/tc-frv.c \ |
252b5132 | 255 | config/tc-h8300.c \ |
252b5132 | 256 | config/tc-hppa.c \ |
800eeca4 | 257 | config/tc-ia64.c \ |
5b93d8bb | 258 | config/tc-i370.c \ |
252b5132 RH |
259 | config/tc-i386.c \ |
260 | config/tc-i860.c \ | |
261 | config/tc-i960.c \ | |
a40cbfa3 | 262 | config/tc-ip2k.c \ |
bd3ba5d1 | 263 | config/tc-iq2000.c \ |
84e94c90 | 264 | config/tc-lm32.c \ |
49f58d10 | 265 | config/tc-m32c.c \ |
252b5132 | 266 | config/tc-m32r.c \ |
60bcf0fa | 267 | config/tc-m68hc11.c \ |
252b5132 | 268 | config/tc-m68k.c \ |
bd3ba5d1 | 269 | config/tc-maxq.c \ |
252b5132 | 270 | config/tc-mcore.c \ |
280d71bf | 271 | config/tc-mep.c \ |
7ba29e2a | 272 | config/tc-microblaze.c \ |
252b5132 | 273 | config/tc-mips.c \ |
3c3bdf30 | 274 | config/tc-mmix.c \ |
252b5132 RH |
275 | config/tc-mn10200.c \ |
276 | config/tc-mn10300.c \ | |
2469cfa2 | 277 | config/tc-msp430.c \ |
bd3ba5d1 | 278 | config/tc-mt.c \ |
252b5132 | 279 | config/tc-ns32k.c \ |
c7e40348 | 280 | config/tc-openrisc.c \ |
3b16e843 | 281 | config/tc-or32.c \ |
e135f41b | 282 | config/tc-pdp11.c \ |
041dd5a9 | 283 | config/tc-pj.c \ |
252b5132 | 284 | config/tc-ppc.c \ |
a85d7ed0 | 285 | config/tc-s390.c \ |
1c0d3aa6 | 286 | config/tc-score.c \ |
252b5132 | 287 | config/tc-sh.c \ |
324bfcf3 | 288 | config/tc-sh64.c \ |
252b5132 | 289 | config/tc-sparc.c \ |
e9f53129 | 290 | config/tc-spu.c \ |
252b5132 | 291 | config/tc-tic30.c \ |
bd3ba5d1 | 292 | config/tc-tic4x.c \ |
39bec121 | 293 | config/tc-tic54x.c \ |
252b5132 | 294 | config/tc-vax.c \ |
252b5132 | 295 | config/tc-v850.c \ |
93fbbb04 | 296 | config/tc-xstormy16.c \ |
d70c5fc7 | 297 | config/tc-xc16x.c \ |
e0001a05 | 298 | config/tc-xtensa.c \ |
3c9b82ba | 299 | config/tc-z80.c \ |
bd3ba5d1 NC |
300 | config/tc-z8k.c \ |
301 | config/xtensa-relax.c | |
252b5132 RH |
302 | |
303 | TARGET_CPU_HFILES = \ | |
252b5132 RH |
304 | config/tc-alpha.h \ |
305 | config/tc-arc.h \ | |
306 | config/tc-arm.h \ | |
ec694b89 | 307 | config/tc-avr.h \ |
07c1b327 | 308 | config/tc-bfin.h \ |
3d3d428f | 309 | config/tc-cr16.h \ |
3bcbcc3d | 310 | config/tc-cris.h \ |
1fe1f39c | 311 | config/tc-crx.h \ |
252b5132 RH |
312 | config/tc-d10v.h \ |
313 | config/tc-d30v.h \ | |
d172d4ba | 314 | config/tc-dlx.h \ |
a4835b42 | 315 | config/tc-fr30.h \ |
0ebb9a87 | 316 | config/tc-frv.h \ |
252b5132 | 317 | config/tc-h8300.h \ |
252b5132 | 318 | config/tc-hppa.h \ |
800eeca4 | 319 | config/tc-ia64.h \ |
5b93d8bb | 320 | config/tc-i370.h \ |
252b5132 RH |
321 | config/tc-i386.h \ |
322 | config/tc-i860.h \ | |
323 | config/tc-i960.h \ | |
a40cbfa3 | 324 | config/tc-ip2k.h \ |
bd3ba5d1 | 325 | config/tc-iq2000.h \ |
84e94c90 | 326 | config/tc-lm32.h \ |
49f58d10 | 327 | config/tc-m32c.h \ |
252b5132 | 328 | config/tc-m32r.h \ |
60bcf0fa | 329 | config/tc-m68hc11.h \ |
252b5132 | 330 | config/tc-m68k.h \ |
bd3ba5d1 | 331 | config/tc-maxq.h \ |
252b5132 | 332 | config/tc-mcore.h \ |
280d71bf | 333 | config/tc-mep.h \ |
7ba29e2a | 334 | config/tc-microblaze.h \ |
252b5132 | 335 | config/tc-mips.h \ |
3c3bdf30 | 336 | config/tc-mmix.h \ |
252b5132 RH |
337 | config/tc-mn10200.h \ |
338 | config/tc-mn10300.h \ | |
2469cfa2 | 339 | config/tc-msp430.h \ |
bd3ba5d1 | 340 | config/tc-mt.h \ |
252b5132 | 341 | config/tc-ns32k.h \ |
c7e40348 | 342 | config/tc-openrisc.h \ |
3b16e843 | 343 | config/tc-or32.h \ |
e135f41b | 344 | config/tc-pdp11.h \ |
041dd5a9 | 345 | config/tc-pj.h \ |
252b5132 | 346 | config/tc-ppc.h \ |
a85d7ed0 | 347 | config/tc-s390.h \ |
1c0d3aa6 | 348 | config/tc-score.h \ |
252b5132 | 349 | config/tc-sh.h \ |
324bfcf3 | 350 | config/tc-sh64.h \ |
252b5132 | 351 | config/tc-sparc.h \ |
e9f53129 | 352 | config/tc-spu.h \ |
252b5132 | 353 | config/tc-tic30.h \ |
bd3ba5d1 | 354 | config/tc-tic4x.h \ |
39bec121 | 355 | config/tc-tic54x.h \ |
252b5132 | 356 | config/tc-vax.h \ |
252b5132 | 357 | config/tc-v850.h \ |
93fbbb04 | 358 | config/tc-xstormy16.h \ |
d70c5fc7 | 359 | config/tc-xc16x.h \ |
e0001a05 | 360 | config/tc-xtensa.h \ |
3c9b82ba | 361 | config/tc-z80.h \ |
bd3ba5d1 NC |
362 | config/tc-z8k.h \ |
363 | config/xtensa-relax.h | |
252b5132 RH |
364 | |
365 | # OBJ files in config | |
366 | ||
367 | OBJ_FORMAT_CFILES = \ | |
368 | config/obj-aout.c \ | |
252b5132 RH |
369 | config/obj-coff.c \ |
370 | config/obj-ecoff.c \ | |
371 | config/obj-elf.c \ | |
372 | config/obj-evax.c \ | |
fe4fa32c | 373 | config/obj-fdpicelf.c \ |
e57f8c65 | 374 | config/obj-macho.c \ |
a5c7551f | 375 | config/obj-multi.c \ |
ec91a2c2 | 376 | config/obj-som.c |
252b5132 RH |
377 | |
378 | OBJ_FORMAT_HFILES = \ | |
379 | config/obj-aout.h \ | |
252b5132 RH |
380 | config/obj-coff.h \ |
381 | config/obj-ecoff.h \ | |
382 | config/obj-elf.h \ | |
383 | config/obj-evax.h \ | |
fe4fa32c | 384 | config/obj-fdpicelf.h \ |
e57f8c65 | 385 | config/obj-macho.h \ |
a5c7551f | 386 | config/obj-multi.h \ |
ec91a2c2 | 387 | config/obj-som.h |
252b5132 RH |
388 | |
389 | # Emulation header files in config | |
390 | ||
391 | TARG_ENV_HFILES = \ | |
392 | config/te-386bsd.h \ | |
bd3ba5d1 NC |
393 | config/te-aix5.h \ |
394 | config/te-armeabi.h \ | |
c820d418 | 395 | config/te-armlinuxeabi.h \ |
252b5132 | 396 | config/te-dynix.h \ |
a4835b42 | 397 | config/te-epoc-pe.h \ |
bd3ba5d1 | 398 | config/te-freebsd.h \ |
252b5132 | 399 | config/te-generic.h \ |
bd3ba5d1 | 400 | config/te-gnu.h \ |
252b5132 | 401 | config/te-go32.h \ |
252b5132 | 402 | config/te-hppa.h \ |
3438adb3 AM |
403 | config/te-hppa64.h \ |
404 | config/te-hppalinux64.h \ | |
252b5132 | 405 | config/te-i386aix.h \ |
7463c317 | 406 | config/te-ia64aix.h \ |
bd3ba5d1 | 407 | config/te-interix.h \ |
252b5132 RH |
408 | config/te-lnews.h \ |
409 | config/te-lynx.h \ | |
410 | config/te-mach.h \ | |
411 | config/te-macos.h \ | |
252b5132 RH |
412 | config/te-nbsd.h \ |
413 | config/te-nbsd532.h \ | |
32137342 | 414 | config/te-netware.h \ |
252b5132 RH |
415 | config/te-pc532mach.h \ |
416 | config/te-pe.h \ | |
252b5132 RH |
417 | config/te-psos.h \ |
418 | config/te-riscix.h \ | |
2774199c | 419 | config/te-solaris.h \ |
252b5132 RH |
420 | config/te-sparcaout.h \ |
421 | config/te-sun3.h \ | |
422 | config/te-svr4.h \ | |
e5a52504 | 423 | config/te-symbian.h \ |
7148cc28 | 424 | config/te-tmips.h \ |
bd3ba5d1 | 425 | config/te-vxworks.h \ |
7148cc28 | 426 | config/te-wince-pe.h |
252b5132 RH |
427 | |
428 | # Multi files in config | |
429 | ||
430 | MULTI_CFILES = \ | |
3bcbcc3d HPN |
431 | config/e-crisaout.c \ |
432 | config/e-criself.c \ | |
4c63da97 | 433 | config/e-i386aout.c \ |
252b5132 RH |
434 | config/e-i386coff.c \ |
435 | config/e-i386elf.c \ | |
436 | config/e-mipsecoff.c \ | |
437 | config/e-mipself.c | |
438 | ||
439 | CONFIG_OBJS = \ | |
440 | $(TARG_CPU_O) \ | |
441 | $(OBJ_FORMAT_O) \ | |
442 | $(ATOF_TARG_O) \ | |
443 | $(extra_objects) | |
444 | ||
445 | GENERIC_OBJS = \ | |
446 | app.o \ | |
447 | as.o \ | |
448 | atof-generic.o \ | |
252b5132 RH |
449 | cond.o \ |
450 | depend.o \ | |
fac0d250 | 451 | dwarf2dbg.o \ |
54cfded0 | 452 | dw2gencfi.o \ |
252b5132 RH |
453 | ehopt.o \ |
454 | expr.o \ | |
455 | flonum-konst.o \ | |
456 | flonum-copy.o \ | |
457 | flonum-mult.o \ | |
458 | frags.o \ | |
459 | hash.o \ | |
460 | input-file.o \ | |
461 | input-scrub.o \ | |
462 | literal.o \ | |
463 | messages.o \ | |
464 | output-file.o \ | |
465 | read.o \ | |
3d6b762c | 466 | remap.o \ |
252b5132 RH |
467 | subsegs.o \ |
468 | symbols.o \ | |
469 | write.o \ | |
470 | listing.o \ | |
471 | ecoff.o \ | |
472 | stabs.o \ | |
473 | sb.o \ | |
474 | macro.o | |
475 | ||
bd3ba5d1 NC |
476 | CONFIG_ATOF_CFILES = \ |
477 | config/atof-ieee.c \ | |
478 | config/atof-vax.c | |
479 | ||
252b5132 RH |
480 | OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS) |
481 | ||
bd3ba5d1 | 482 | POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) $(TARG_ENV_HFILES) $(OBJ_FORMAT_HFILES) \ |
252b5132 | 483 | $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \ |
620c54b3 | 484 | $(HFILES) $(CFILES) |
252b5132 | 485 | po/POTFILES.in: @MAINT@ Makefile |
323ee3f4 | 486 | for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \ |
252b5132 RH |
487 | && mv tmp $(srcdir)/po/POTFILES.in |
488 | ||
fea17916 NC |
489 | # Note: GASP is now deprecated and has been removed. It is still |
490 | # available in the CVS archive or older binutils releases if it is needed. | |
3f965e60 | 491 | noinst_PROGRAMS = as-new |
81afc846 ILT |
492 | noinst_SCRIPTS = $(GDBINIT) |
493 | EXTRA_SCRIPTS = .gdbinit | |
252b5132 | 494 | |
07c1b327 | 495 | EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ |
9ba4c445 | 496 | bfin-parse.c bfin-parse.h bfin-lex.c |
07c1b327 | 497 | |
c45021f2 | 498 | diststuff: $(EXTRA_DIST) info |
252b5132 RH |
499 | |
500 | DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h | |
501 | ||
502 | # Now figure out from those variables how to compile and link. | |
503 | ||
504 | BASEDIR = $(srcdir)/.. | |
505 | BFDDIR = $(BASEDIR)/bfd | |
506 | INCDIR = $(BASEDIR)/include | |
507 | ||
508 | # This is the variable actually used when we compile. | |
509 | # Specify the directories to be searched for header files. | |
510 | # Both . and srcdir are used, in that order, | |
511 | # so that tm.h and config.h will be found in the compilation | |
512 | # subdirectory rather than in the source directory. | |
0efedc4c | 513 | INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \ |
92f01d61 | 514 | -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \ |
92f01d61 | 515 | -DLOCALEDIR="\"$(datadir)/locale\"" |
252b5132 | 516 | |
252b5132 RH |
517 | # How to link with both our special library facilities |
518 | # and the system's installed libraries. | |
519 | ||
03bf704f | 520 | GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a |
252b5132 RH |
521 | |
522 | # Files to be copied away after each stage in building. | |
523 | STAGESTUFF = *.o $(noinst_PROGRAMS) | |
524 | ||
252b5132 RH |
525 | as_new_SOURCES = $(GAS_CFILES) |
526 | as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ | |
20e95c23 | 527 | $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM) |
252b5132 | 528 | as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ |
20e95c23 | 529 | $(extra_objects) $(GASLIBS) $(LIBINTL_DEP) |
a5c7551f RW |
530 | EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ |
531 | $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ | |
532 | $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) | |
252b5132 | 533 | |
c3298874 BE |
534 | EXPECT = expect |
535 | RUNTEST = runtest | |
252b5132 RH |
536 | RUNTESTFLAGS= |
537 | ||
538 | check-DEJAGNU: site.exp | |
539 | if [ -d testsuite ]; then \ | |
540 | true; \ | |
541 | else \ | |
542 | mkdir testsuite; \ | |
543 | fi | |
544 | rm -f testsuite/site.exp | |
545 | cp site.exp testsuite/site.exp | |
546 | rootme=`pwd`; export rootme; \ | |
547 | srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ | |
548 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
252b5132 RH |
549 | runtest=$(RUNTEST); \ |
550 | cd testsuite; \ | |
551 | if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ | |
552 | $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \ | |
553 | $(RUNTESTFLAGS); \ | |
554 | else echo "WARNING: could not find \`runtest'" 1>&2; :;\ | |
555 | fi | |
556 | ||
252b5132 RH |
557 | # The m68k operand parser. |
558 | ||
a5c7551f | 559 | EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y |
252b5132 RH |
560 | |
561 | # If m68k-parse.y is in a different directory, then ylwrap will use an | |
562 | # absolute path when it invokes yacc, which will cause yacc to put the | |
563 | # absolute path into the generated file. That's a pain when it comes | |
564 | # to generating snapshots, because it introduces spurious diffs. | |
565 | # Since when we make the snapshots $(srcdir) = ".", we check for that | |
566 | # case and handle it differently. This means that anybody who | |
567 | # configures with $(srcdir) = "." will have to set their path in the | |
568 | # debugger if they want to debug m68k-parse.y. This is bad, but on | |
569 | # the other hand it's good that people who use the prebuilt | |
570 | # m68k-parse.c don't get a spurious absolute path. | |
571 | m68k-parse.c: $(srcdir)/config/m68k-parse.y | |
572 | f=$(srcdir)/config/m68k-parse.y; \ | |
573 | if [ $$f = "./config/m68k-parse.y" ]; then \ | |
574 | ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \ | |
575 | ln config/m68k-parse.y . > /dev/null 2>/dev/null || \ | |
576 | cp config/m68k-parse.y . >/dev/null 2>/dev/null; \ | |
577 | f=m68k-parse.y; \ | |
578 | else true; fi; \ | |
42ecbf5e | 579 | $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \ |
252b5132 RH |
580 | if [ $$f = "m68k-parse.y" ]; then \ |
581 | rm -f m68k-parse.y; \ | |
582 | else true; fi | |
1a66a017 | 583 | # Disable -Werror, if it has been enabled, since old versions of bison/ |
12e64c2c | 584 | # yacc will produce working code which contain compile time warnings. |
a5c7551f RW |
585 | m68k-parse.o: m68k-parse.c |
586 | if am__fastdepCC | |
587 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ m68k-parse.c $(NO_WERROR) | |
588 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
589 | else | |
590 | if AMDEP | |
591 | source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
592 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
593 | endif | |
594 | $(COMPILE) -c m68k-parse.c $(NO_WERROR) | |
595 | endif | |
252b5132 RH |
596 | |
597 | # Don't let the .y.h rule clobber m68k-parse.h. | |
598 | m68k-parse.h: ; @true | |
599 | $(srcdir)/config/m68k-parse.h: ; @true | |
600 | ||
7c8d43d8 | 601 | bfin-parse.c: $(srcdir)/config/bfin-parse.y |
9ba4c445 | 602 | $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; |
7c8d43d8 | 603 | bfin-parse.h: bfin-parse.c |
1ac4baed BS |
604 | bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \ |
605 | $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h | |
07c1b327 CM |
606 | |
607 | bfin-defs.h: ; @true | |
608 | $(srcdir)/config/bfin-defs.h: ; @true | |
609 | ||
610 | bfin-lex.c: $(srcdir)/config/bfin-lex.l | |
1e0486ea | 611 | $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) |
a5c7551f RW |
612 | bfin-lex.o: bfin-lex.c |
613 | if am__fastdepCC | |
614 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR) | |
615 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
616 | else | |
617 | if AMDEP | |
618 | source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
619 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
620 | endif | |
621 | $(COMPILE) -c bfin-lex.c $(NO_WERROR) | |
622 | endif | |
07c1b327 | 623 | |
252b5132 RH |
624 | # The instruction table specification lexical analyzer and parser. |
625 | ||
0876dd7e | 626 | # Disable -Werror, if it has been enabled, since old versions of bison/ |
12e64c2c | 627 | # yacc will produce working code which contain compile time warnings. |
a5c7551f RW |
628 | itbl-lex.o: itbl-lex.c |
629 | if am__fastdepCC | |
630 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c $(NO_WERROR) | |
631 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
632 | else | |
633 | if AMDEP | |
634 | source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
635 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
636 | endif | |
637 | $(COMPILE) -c itbl-lex.c $(NO_WERROR) | |
638 | endif | |
252b5132 | 639 | |
1a66a017 | 640 | # Disable -Werror, if it has been enabled, since old versions of bison/ |
12e64c2c | 641 | # yacc will produce working code which contain compile time warnings. |
a5c7551f RW |
642 | itbl-parse.o: itbl-parse.c |
643 | if am__fastdepCC | |
644 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-parse.c $(NO_WERROR) | |
645 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
646 | else | |
647 | if AMDEP | |
648 | source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
649 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
650 | endif | |
651 | $(COMPILE) -c itbl-parse.c $(NO_WERROR) | |
652 | endif | |
252b5132 RH |
653 | |
654 | itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y | |
42ecbf5e | 655 | $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d |
252b5132 RH |
656 | |
657 | # stand-alone itbl assembler & disassembler | |
658 | ||
fea17916 | 659 | EXTRA_PROGRAMS = itbl-test |
252b5132 | 660 | itbl_test_SOURCES = itbl-parse.y itbl-lex.l |
46eec08e | 661 | itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@ |
252b5132 | 662 | |
a5c7551f RW |
663 | itbl-tops.o: itbl-ops.c |
664 | if am__fastdepCC | |
665 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c | |
666 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
667 | else | |
668 | if AMDEP | |
669 | source='itbl-ops.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
670 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
671 | endif | |
672 | $(COMPILE) -o $@ -DSTAND_ALONE -c $(srcdir)/itbl-ops.c | |
673 | endif | |
674 | ||
675 | itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c | |
676 | if am__fastdepCC | |
677 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c | |
678 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
679 | else | |
680 | if AMDEP | |
681 | source='itbl-test.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
682 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
683 | endif | |
252b5132 | 684 | $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c |
a5c7551f | 685 | endif |
252b5132 RH |
686 | |
687 | # CGEN interface. | |
688 | ||
689 | CGEN_CPU_PREFIX = @cgen_cpu_prefix@ | |
690 | ||
691 | cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \ | |
692 | $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \ | |
693 | $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \ | |
694 | $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h | |
695 | ||
696 | # Remake the info files. | |
697 | ||
e079bef8 | 698 | MOSTLYCLEANFILES = $(STAGESTUFF) core \ |
252b5132 RH |
699 | testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \ |
700 | testsuite/site.exp site.bak site.exp stage stage1 stage2 | |
701 | ||
252b5132 RH |
702 | .PHONY: install-exec-local install-data-local |
703 | .PHONY: install-exec-bindir install-exec-tooldir | |
704 | ||
705 | install-exec-local: install-exec-bindir @install_tooldir@ | |
706 | ||
707 | install-exec-bindir: $(noinst_PROGRAMS) | |
d3d8a9ee | 708 | $(mkinstalldirs) $(DESTDIR)$(bindir) |
252b5132 RH |
709 | @list='$(noinst_PROGRAMS)'; for p in $$list; do \ |
710 | if test -f $$p; then \ | |
711 | echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ | |
d3d8a9ee | 712 | $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ |
252b5132 RH |
713 | else :; fi; \ |
714 | done | |
715 | ||
f8c827e9 | 716 | install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS) |
d3d8a9ee | 717 | $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin |
252b5132 RH |
718 | n=`echo as | sed '$(transform)'`; \ |
719 | if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \ | |
d3d8a9ee NC |
720 | rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ |
721 | ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ | |
722 | || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ | |
252b5132 RH |
723 | else \ |
724 | true ; \ | |
725 | fi | |
726 | ||
727 | # These exist for maintenance purposes. | |
728 | ||
729 | .PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison | |
730 | ||
731 | bootstrap: as-new | |
732 | $(MAKE) stage1 | |
733 | rm -f stage && ln -s stage1 stage | |
734 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS) | |
735 | $(MAKE) stage2 | |
736 | rm -f stage && ln -s stage2 stage | |
737 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS) | |
738 | $(MAKE) comparison against=stage2 | |
739 | ||
740 | bootstrap2: | |
741 | rm -f stage && ln -s stage1 stage | |
742 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS) | |
743 | $(MAKE) stage2 | |
744 | rm -f stage && ln -s stage2 stage | |
745 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS) | |
746 | $(MAKE) comparison against=stage2 | |
747 | ||
748 | bootstrap3: | |
749 | rm -f stage && ln -s stage2 stage | |
750 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS) | |
751 | $(MAKE) comparison against=stage2 | |
752 | ||
753 | # Copy the object files from a particular stage into a subdirectory. | |
754 | stage1: | |
755 | -mkdir stage1 | |
756 | -mv $(STAGESTUFF) stage1 | |
757 | if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi | |
758 | ||
759 | stage2: | |
760 | -mkdir stage2 | |
761 | -mv $(STAGESTUFF) stage2 | |
762 | if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi | |
763 | ||
764 | stage3: | |
765 | -mkdir stage3 | |
766 | -mv $(STAGESTUFF) stage3 | |
767 | if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi | |
768 | ||
769 | against=stage2 | |
770 | ||
771 | # This rule is derived from corresponding code in the Makefile.in for gcc. | |
772 | # The "tail +16c" is to bypass headers which may include timestamps or | |
773 | # temporary assembly file names. | |
774 | comparison: | |
775 | x=0 ; \ | |
776 | for file in *.o ; do \ | |
777 | tail +16c ./$$file > tmp-foo1; \ | |
778 | if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \ | |
779 | if cmp tmp-foo1 tmp-foo2 ; then \ | |
780 | true ; \ | |
781 | else \ | |
782 | echo $$file differs ; \ | |
783 | x=1 ; \ | |
784 | fi ; \ | |
785 | else true; fi ; \ | |
786 | done ; \ | |
787 | exit $$x | |
788 | -rm -f tmp-foo* | |
789 | ||
790 | .PHONY: de-stage1 de-stage2 de-stage3 | |
791 | ||
792 | de-stage1: | |
793 | - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..) | |
794 | - rmdir stage1 | |
795 | ||
796 | de-stage2: | |
797 | - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..) | |
798 | - rmdir stage2 | |
799 | ||
800 | de-stage3: | |
801 | - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) | |
802 | - rmdir stage3 | |
803 | ||
14ee9f48 | 804 | CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt |