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