1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = 1.11 dejagnu foreign no-dist
4 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
8 tooldir = $(exec_prefix)/$(target_alias)
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`
13 WARN_CFLAGS = @WARN_CFLAGS@
14 NO_WERROR = @NO_WERROR@
15 AM_CFLAGS = $(WARN_CFLAGS)
17 TARG_CPU = @target_cpu_type@
18 TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
19 TARG_CPU_O = tc-@target_cpu_type@.o
20 TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h
21 OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c
22 OBJ_FORMAT_O = obj-@obj_format@.o
23 OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
24 TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
25 ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
26 ATOF_TARG_O = atof-@atof@.o
28 # use @target_cpu_type@ for refering to configured target name
29 IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
30 IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
31 IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
32 IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
34 # CPU types. This is only used for dependency information.
96 # Object format types. This is only used for dependency information.
97 # We deliberately omit SOM, since it does not work as a cross assembler.
107 # This is an sh case which sets valid according to whether the CPU
108 # type in the shell variable c and the OS type in the shell variable o
109 # are supported. This helps cuts down on the amount of dependency
117 arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
122 arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \
123 | ppc | sh | sparc | tic* | xscale | z80 | z8k) \
128 mips | alpha) valid=yes ;; \
132 maxq | ns32k | tic* | z80 | z8k) valid= ;; \
136 alpha) valid=yes ;; \
148 # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
150 MULTI_CPU_TYPES = i386 mips cris
152 MULTI_CPU_OBJ_VALID = \
157 i386 | cris) valid=yes ;; \
161 i386 | mips) valid=yes ;; \
170 # Regular source files.
203 CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
235 # CPU files in config.
237 TARGET_CPU_CFILES = \
263 config/tc-m68hc11.c \
268 config/tc-microblaze.c \
271 config/tc-mn10200.c \
272 config/tc-mn10300.c \
276 config/tc-openrisc.c \
292 config/tc-xstormy16.c \
297 config/xtensa-relax.c
299 TARGET_CPU_HFILES = \
325 config/tc-m68hc11.h \
330 config/tc-microblaze.h \
333 config/tc-mn10200.h \
334 config/tc-mn10300.h \
338 config/tc-openrisc.h \
354 config/tc-xstormy16.h \
359 config/xtensa-relax.h
361 # OBJ files in config
363 OBJ_FORMAT_CFILES = \
369 config/obj-fdpicelf.c \
374 OBJ_FORMAT_HFILES = \
380 config/obj-fdpicelf.h \
385 # Emulation header files in config
390 config/te-armeabi.h \
391 config/te-armlinuxeabi.h \
393 config/te-epoc-pe.h \
394 config/te-freebsd.h \
395 config/te-generic.h \
400 config/te-hppalinux64.h \
401 config/te-i386aix.h \
402 config/te-ia64aix.h \
403 config/te-interix.h \
409 config/te-nbsd532.h \
410 config/te-netware.h \
411 config/te-pc532mach.h \
415 config/te-solaris.h \
416 config/te-sparcaout.h \
419 config/te-symbian.h \
421 config/te-vxworks.h \
424 # Multi files in config
427 config/e-crisaout.c \
429 config/e-i386aout.c \
430 config/e-i386coff.c \
432 config/e-mipsecoff.c \
472 CONFIG_ATOF_CFILES = \
476 OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
478 POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) $(TARG_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
479 $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
481 po/POTFILES.in: @MAINT@ Makefile
482 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
483 && mv tmp $(srcdir)/po/POTFILES.in
485 # Note: GASP is now deprecated and has been removed. It is still
486 # available in the CVS archive or older binutils releases if it is needed.
487 noinst_PROGRAMS = as-new
488 noinst_SCRIPTS = $(GDBINIT)
489 EXTRA_SCRIPTS = .gdbinit
491 EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
492 bfin-parse.c bfin-parse.h bfin-lex.c
494 diststuff: $(EXTRA_DIST) info
496 DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
498 # Now figure out from those variables how to compile and link.
500 BASEDIR = $(srcdir)/..
501 BFDDIR = $(BASEDIR)/bfd
502 INCDIR = $(BASEDIR)/include
504 # This is the variable actually used when we compile.
505 # Specify the directories to be searched for header files.
506 # Both . and srcdir are used, in that order,
507 # so that tm.h and config.h will be found in the compilation
508 # subdirectory rather than in the source directory.
509 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
510 -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
511 -DLOCALEDIR="\"$(datadir)/locale\""
513 # How to link with both our special library facilities
514 # and the system's installed libraries.
516 GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
518 # Files to be copied away after each stage in building.
519 STAGESTUFF = *.o $(noinst_PROGRAMS)
521 as_new_SOURCES = $(GAS_CFILES)
522 as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
523 $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
524 as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
525 $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
526 EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
527 $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \
528 $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
534 check-DEJAGNU: site.exp
535 if [ -d testsuite ]; then \
540 rm -f testsuite/site.exp
541 cp site.exp testsuite/site.exp
542 rootme=`pwd`; export rootme; \
543 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
544 EXPECT=${EXPECT} ; export EXPECT ; \
545 runtest=$(RUNTEST); \
547 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
548 $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
550 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
553 # The m68k operand parser.
555 EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y
557 # If m68k-parse.y is in a different directory, then ylwrap will use an
558 # absolute path when it invokes yacc, which will cause yacc to put the
559 # absolute path into the generated file. That's a pain when it comes
560 # to generating snapshots, because it introduces spurious diffs.
561 # Since when we make the snapshots $(srcdir) = ".", we check for that
562 # case and handle it differently. This means that anybody who
563 # configures with $(srcdir) = "." will have to set their path in the
564 # debugger if they want to debug m68k-parse.y. This is bad, but on
565 # the other hand it's good that people who use the prebuilt
566 # m68k-parse.c don't get a spurious absolute path.
567 m68k-parse.c: $(srcdir)/config/m68k-parse.y
568 f=$(srcdir)/config/m68k-parse.y; \
569 if [ $$f = "./config/m68k-parse.y" ]; then \
570 ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
571 ln config/m68k-parse.y . > /dev/null 2>/dev/null || \
572 cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
575 $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
576 if [ $$f = "m68k-parse.y" ]; then \
577 rm -f m68k-parse.y; \
579 # Disable -Werror, if it has been enabled, since old versions of bison/
580 # yacc will produce working code which contain compile time warnings.
581 m68k-parse.o: m68k-parse.c
583 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ m68k-parse.c $(NO_WERROR)
584 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
587 source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
588 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
590 $(COMPILE) -c m68k-parse.c $(NO_WERROR)
593 # Don't let the .y.h rule clobber m68k-parse.h.
594 m68k-parse.h: ; @true
595 $(srcdir)/config/m68k-parse.h: ; @true
597 bfin-parse.c: $(srcdir)/config/bfin-parse.y
598 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
599 bfin-parse.h: bfin-parse.c
600 bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \
601 $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
604 $(srcdir)/config/bfin-defs.h: ; @true
606 bfin-lex.c: $(srcdir)/config/bfin-lex.l
607 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
608 bfin-lex.o: bfin-lex.c
610 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR)
611 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
614 source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
615 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
617 $(COMPILE) -c bfin-lex.c $(NO_WERROR)
620 # The instruction table specification lexical analyzer and parser.
622 # Disable -Werror, if it has been enabled, since old versions of bison/
623 # yacc will produce working code which contain compile time warnings.
624 itbl-lex.o: itbl-lex.c
626 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c $(NO_WERROR)
627 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
630 source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
631 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
633 $(COMPILE) -c itbl-lex.c $(NO_WERROR)
636 # Disable -Werror, if it has been enabled, since old versions of bison/
637 # yacc will produce working code which contain compile time warnings.
638 itbl-parse.o: itbl-parse.c
640 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-parse.c $(NO_WERROR)
641 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
644 source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
645 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
647 $(COMPILE) -c itbl-parse.c $(NO_WERROR)
650 itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
651 $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
653 # stand-alone itbl assembler & disassembler
655 EXTRA_PROGRAMS = itbl-test
656 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
657 itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
659 itbl-tops.o: itbl-ops.c
661 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c
662 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
665 source='itbl-ops.c' object='$@' libtool=no @AMDEPBACKSLASH@
666 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
668 $(COMPILE) -o $@ -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
671 itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c
673 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
674 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
677 source='itbl-test.c' object='$@' libtool=no @AMDEPBACKSLASH@
678 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
680 $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
685 CGEN_CPU_PREFIX = @cgen_cpu_prefix@
687 cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
688 $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
689 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
690 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
692 # Remake the info files.
694 MOSTLYCLEANFILES = $(STAGESTUFF) core \
695 testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \
696 testsuite/site.exp site.bak site.exp stage stage1 stage2
698 .PHONY: install-exec-local install-data-local
699 .PHONY: install-exec-bindir install-exec-tooldir
701 install-exec-local: install-exec-bindir @install_tooldir@
703 install-exec-bindir: $(noinst_PROGRAMS)
704 $(mkinstalldirs) $(DESTDIR)$(bindir)
705 @list='$(noinst_PROGRAMS)'; for p in $$list; do \
706 if test -f $$p; then \
707 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
708 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
712 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
713 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
714 n=`echo as | sed '$(transform)'`; \
715 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
716 rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
717 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
718 || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
723 # These exist for maintenance purposes.
725 .PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
729 rm -f stage && ln -s stage1 stage
730 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
732 rm -f stage && ln -s stage2 stage
733 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
734 $(MAKE) comparison against=stage2
737 rm -f stage && ln -s stage1 stage
738 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
740 rm -f stage && ln -s stage2 stage
741 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
742 $(MAKE) comparison against=stage2
745 rm -f stage && ln -s stage2 stage
746 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
747 $(MAKE) comparison against=stage2
749 # Copy the object files from a particular stage into a subdirectory.
752 -mv $(STAGESTUFF) stage1
753 if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
757 -mv $(STAGESTUFF) stage2
758 if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
762 -mv $(STAGESTUFF) stage3
763 if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
767 # This rule is derived from corresponding code in the Makefile.in for gcc.
768 # The "tail +16c" is to bypass headers which may include timestamps or
769 # temporary assembly file names.
772 for file in *.o ; do \
773 tail +16c ./$$file > tmp-foo1; \
774 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
775 if cmp tmp-foo1 tmp-foo2 ; then \
778 echo $$file differs ; \
786 .PHONY: de-stage1 de-stage2 de-stage3
789 - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
793 - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
797 - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
800 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt