177e7f32fbdd04d9dffbde3e7913ac26fbc8025b
[binutils-gdb.git] / gas / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.11 dejagnu foreign no-dist
4 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
5
6 SUBDIRS = doc po
7
8 tooldir = $(exec_prefix)/$(target_alias)
9
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`
12
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
17 WARN_CFLAGS = @WARN_CFLAGS@
18 NO_WERROR = @NO_WERROR@
19 AM_CFLAGS = $(WARN_CFLAGS)
20
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
33 IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
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 = \
41 alpha \
42 arc \
43 arm \
44 avr \
45 bfin \
46 cr16 \
47 cris \
48 crx \
49 d10v \
50 d30v \
51 dlx \
52 fr30 \
53 frv \
54 h8300 \
55 hppa \
56 i370 \
57 i386 \
58 i860 \
59 i960 \
60 ia64 \
61 ip2k \
62 lm32 \
63 m32c \
64 m32r \
65 m68hc11 \
66 m68k \
67 maxq \
68 mcore \
69 mep \
70 microblaze \
71 mips \
72 mmix \
73 mn10200 \
74 mn10300 \
75 msp430 \
76 mt \
77 ns32k \
78 openrisc \
79 or32 \
80 pdp11 \
81 pj \
82 ppc \
83 s390 \
84 score \
85 sh \
86 sh64 \
87 sparc \
88 spu \
89 tic30 \
90 tic4x \
91 tic54x \
92 v850 \
93 vax \
94 xc16x \
95 xstormy16 \
96 xtensa \
97 z80 \
98 z8k
99
100 # Object format types. This is only used for dependency information.
101 # We deliberately omit SOM, since it does not work as a cross assembler.
102
103 OBJ_FORMATS = \
104 aout \
105 coff \
106 ecoff \
107 elf \
108 evax \
109 macho
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 \
121 arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
122 valid=yes ;; \
123 esac ;; \
124 coff) \
125 case $$c in \
126 arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \
127 | ppc | sh | sparc | tic* | xscale | z80 | z8k) \
128 valid=yes ;; \
129 esac ;; \
130 ecoff) \
131 case $$c in \
132 mips | alpha) valid=yes ;; \
133 esac ;; \
134 elf) valid=yes ; \
135 case $$c in \
136 maxq | ns32k | tic* | z80 | z8k) valid= ;; \
137 esac ;; \
138 evax) \
139 case $$c in \
140 alpha) valid=yes ;; \
141 esac ;; \
142 macho) \
143 case $$c in \
144 i386) valid=yes ;; \
145 esac ;; \
146 vms) \
147 case $$c in \
148 vax) valid=yes ;; \
149 esac ;; \
150 esac;
151
152 # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
153
154 MULTI_CPU_TYPES = i386 mips cris
155
156 MULTI_CPU_OBJ_VALID = \
157 valid= ; \
158 case $$o in \
159 aout) \
160 case $$c in \
161 i386 | cris) valid=yes ;; \
162 esac ;; \
163 coff) \
164 case $$c in \
165 i386 | mips) valid=yes ;; \
166 esac ;; \
167 ecoff) \
168 case $$c in \
169 mips) valid=yes ;; \
170 esac ;; \
171 elf) valid=yes ;; \
172 esac;
173
174 # Regular source files.
175
176 GAS_CFILES = \
177 app.c \
178 as.c \
179 atof-generic.c \
180 cond.c \
181 depend.c \
182 dwarf2dbg.c \
183 dw2gencfi.c \
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 \
200 remap.c \
201 sb.c \
202 stabs.c \
203 subsegs.c \
204 symbols.c \
205 write.c
206
207 CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
208
209 HFILES = \
210 as.h \
211 asintl.h \
212 bignum.h \
213 bit_fix.h \
214 cgen.h \
215 dwarf2dbg.h \
216 dw2gencfi.h \
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 \
225 itbl-lex.h \
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 = \
242 config/tc-alpha.c \
243 config/tc-arc.c \
244 config/tc-arm.c \
245 config/tc-avr.c \
246 config/tc-bfin.c \
247 config/tc-cr16.c \
248 config/tc-cris.c \
249 config/tc-crx.c \
250 config/tc-d10v.c \
251 config/tc-d30v.c \
252 config/tc-dlx.c \
253 config/tc-fr30.c \
254 config/tc-frv.c \
255 config/tc-h8300.c \
256 config/tc-hppa.c \
257 config/tc-ia64.c \
258 config/tc-i370.c \
259 config/tc-i386.c \
260 config/tc-i860.c \
261 config/tc-i960.c \
262 config/tc-ip2k.c \
263 config/tc-iq2000.c \
264 config/tc-lm32.c \
265 config/tc-m32c.c \
266 config/tc-m32r.c \
267 config/tc-m68hc11.c \
268 config/tc-m68k.c \
269 config/tc-maxq.c \
270 config/tc-mcore.c \
271 config/tc-mep.c \
272 config/tc-microblaze.c \
273 config/tc-mips.c \
274 config/tc-mmix.c \
275 config/tc-mn10200.c \
276 config/tc-mn10300.c \
277 config/tc-msp430.c \
278 config/tc-mt.c \
279 config/tc-ns32k.c \
280 config/tc-openrisc.c \
281 config/tc-or32.c \
282 config/tc-pdp11.c \
283 config/tc-pj.c \
284 config/tc-ppc.c \
285 config/tc-s390.c \
286 config/tc-score.c \
287 config/tc-sh.c \
288 config/tc-sh64.c \
289 config/tc-sparc.c \
290 config/tc-spu.c \
291 config/tc-tic30.c \
292 config/tc-tic4x.c \
293 config/tc-tic54x.c \
294 config/tc-vax.c \
295 config/tc-v850.c \
296 config/tc-xstormy16.c \
297 config/tc-xc16x.c \
298 config/tc-xtensa.c \
299 config/tc-z80.c \
300 config/tc-z8k.c \
301 config/xtensa-relax.c
302
303 TARGET_CPU_HFILES = \
304 config/tc-alpha.h \
305 config/tc-arc.h \
306 config/tc-arm.h \
307 config/tc-avr.h \
308 config/tc-bfin.h \
309 config/tc-cr16.h \
310 config/tc-cris.h \
311 config/tc-crx.h \
312 config/tc-d10v.h \
313 config/tc-d30v.h \
314 config/tc-dlx.h \
315 config/tc-fr30.h \
316 config/tc-frv.h \
317 config/tc-h8300.h \
318 config/tc-hppa.h \
319 config/tc-ia64.h \
320 config/tc-i370.h \
321 config/tc-i386.h \
322 config/tc-i860.h \
323 config/tc-i960.h \
324 config/tc-ip2k.h \
325 config/tc-iq2000.h \
326 config/tc-lm32.h \
327 config/tc-m32c.h \
328 config/tc-m32r.h \
329 config/tc-m68hc11.h \
330 config/tc-m68k.h \
331 config/tc-maxq.h \
332 config/tc-mcore.h \
333 config/tc-mep.h \
334 config/tc-microblaze.h \
335 config/tc-mips.h \
336 config/tc-mmix.h \
337 config/tc-mn10200.h \
338 config/tc-mn10300.h \
339 config/tc-msp430.h \
340 config/tc-mt.h \
341 config/tc-ns32k.h \
342 config/tc-openrisc.h \
343 config/tc-or32.h \
344 config/tc-pdp11.h \
345 config/tc-pj.h \
346 config/tc-ppc.h \
347 config/tc-s390.h \
348 config/tc-score.h \
349 config/tc-sh.h \
350 config/tc-sh64.h \
351 config/tc-sparc.h \
352 config/tc-spu.h \
353 config/tc-tic30.h \
354 config/tc-tic4x.h \
355 config/tc-tic54x.h \
356 config/tc-vax.h \
357 config/tc-v850.h \
358 config/tc-xstormy16.h \
359 config/tc-xc16x.h \
360 config/tc-xtensa.h \
361 config/tc-z80.h \
362 config/tc-z8k.h \
363 config/xtensa-relax.h
364
365 # OBJ files in config
366
367 OBJ_FORMAT_CFILES = \
368 config/obj-aout.c \
369 config/obj-coff.c \
370 config/obj-ecoff.c \
371 config/obj-elf.c \
372 config/obj-evax.c \
373 config/obj-fdpicelf.c \
374 config/obj-macho.c \
375 config/obj-multi.c \
376 config/obj-som.c
377
378 OBJ_FORMAT_HFILES = \
379 config/obj-aout.h \
380 config/obj-coff.h \
381 config/obj-ecoff.h \
382 config/obj-elf.h \
383 config/obj-evax.h \
384 config/obj-fdpicelf.h \
385 config/obj-macho.h \
386 config/obj-multi.h \
387 config/obj-som.h
388
389 # Emulation header files in config
390
391 TARG_ENV_HFILES = \
392 config/te-386bsd.h \
393 config/te-aix5.h \
394 config/te-armeabi.h \
395 config/te-armlinuxeabi.h \
396 config/te-dynix.h \
397 config/te-epoc-pe.h \
398 config/te-freebsd.h \
399 config/te-generic.h \
400 config/te-gnu.h \
401 config/te-go32.h \
402 config/te-hppa.h \
403 config/te-hppa64.h \
404 config/te-hppalinux64.h \
405 config/te-i386aix.h \
406 config/te-ia64aix.h \
407 config/te-interix.h \
408 config/te-lnews.h \
409 config/te-lynx.h \
410 config/te-mach.h \
411 config/te-macos.h \
412 config/te-nbsd.h \
413 config/te-nbsd532.h \
414 config/te-netware.h \
415 config/te-pc532mach.h \
416 config/te-pe.h \
417 config/te-psos.h \
418 config/te-riscix.h \
419 config/te-solaris.h \
420 config/te-sparcaout.h \
421 config/te-sun3.h \
422 config/te-svr4.h \
423 config/te-symbian.h \
424 config/te-tmips.h \
425 config/te-vxworks.h \
426 config/te-wince-pe.h
427
428 # Multi files in config
429
430 MULTI_CFILES = \
431 config/e-crisaout.c \
432 config/e-criself.c \
433 config/e-i386aout.c \
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 \
449 cond.o \
450 depend.o \
451 dwarf2dbg.o \
452 dw2gencfi.o \
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 \
466 remap.o \
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
476 CONFIG_ATOF_CFILES = \
477 config/atof-ieee.c \
478 config/atof-vax.c
479
480 OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
481
482 POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) $(TARG_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
483 $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
484 $(HFILES) $(CFILES)
485 po/POTFILES.in: @MAINT@ Makefile
486 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
487 && mv tmp $(srcdir)/po/POTFILES.in
488
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.
491 noinst_PROGRAMS = as-new
492 noinst_SCRIPTS = $(GDBINIT)
493 EXTRA_SCRIPTS = .gdbinit
494
495 EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
496 bfin-parse.c bfin-parse.h bfin-lex.c
497
498 diststuff: $(EXTRA_DIST) info
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.
513 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
514 -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
515 -DLOCALEDIR="\"$(datadir)/locale\""
516
517 # How to link with both our special library facilities
518 # and the system's installed libraries.
519
520 GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
521
522 # Files to be copied away after each stage in building.
523 STAGESTUFF = *.o $(noinst_PROGRAMS)
524
525 as_new_SOURCES = $(GAS_CFILES)
526 as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
527 $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
528 as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
529 $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
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)
533
534 EXPECT = expect
535 RUNTEST = runtest
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 ; \
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
557 # The m68k operand parser.
558
559 EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y
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; \
579 $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
580 if [ $$f = "m68k-parse.y" ]; then \
581 rm -f m68k-parse.y; \
582 else true; fi
583 # Disable -Werror, if it has been enabled, since old versions of bison/
584 # yacc will produce working code which contain compile time warnings.
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
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
601 bfin-parse.c: $(srcdir)/config/bfin-parse.y
602 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
603 bfin-parse.h: bfin-parse.c
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
606
607 bfin-defs.h: ; @true
608 $(srcdir)/config/bfin-defs.h: ; @true
609
610 bfin-lex.c: $(srcdir)/config/bfin-lex.l
611 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
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
623
624 # The instruction table specification lexical analyzer and parser.
625
626 # Disable -Werror, if it has been enabled, since old versions of bison/
627 # yacc will produce working code which contain compile time warnings.
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
639
640 # Disable -Werror, if it has been enabled, since old versions of bison/
641 # yacc will produce working code which contain compile time warnings.
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
653
654 itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
655 $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
656
657 # stand-alone itbl assembler & disassembler
658
659 EXTRA_PROGRAMS = itbl-test
660 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
661 itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
662
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
684 $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
685 endif
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
698 MOSTLYCLEANFILES = $(STAGESTUFF) core \
699 testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \
700 testsuite/site.exp site.bak site.exp stage stage1 stage2
701
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)
708 $(mkinstalldirs) $(DESTDIR)$(bindir)
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)/'`"; \
712 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
713 else :; fi; \
714 done
715
716 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
717 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
718 n=`echo as | sed '$(transform)'`; \
719 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
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); \
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
804 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt