bfd:
[binutils-gdb.git] / opcodes / Makefile.in
index 037f5ac1e96c3c22b714cd1369a5818a4f21e7a3..7fd6e78a9813d59d87a97ebbb6aba5ab60f9562a 100644 (file)
@@ -16,6 +16,7 @@
 @SET_MAKE@
 
 
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -36,6 +37,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@INSTALL_LIBBFD_FALSE@am__append_1 = -rpath $(rpath_bfdlibdir)
 subdir = .
 DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(top_srcdir)/configure $(am__configure_deps) \
@@ -43,6 +45,7 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(top_srcdir)/po/Make-in $(srcdir)/../depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+       $(top_srcdir)/../config/zlib.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
@@ -89,14 +92,17 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(bfdlibdir)"
-LTLIBRARIES = $(bfdlib_LTLIBRARIES)
+am__installdirs = "$(DESTDIR)$(bfdlibdir)" \
+       "$(DESTDIR)$(bfdincludedir)"
+LTLIBRARIES = $(bfdlib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 am_libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo dis-init.lo
 libopcodes_la_OBJECTS = $(am_libopcodes_la_OBJECTS)
 libopcodes_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(libopcodes_la_LDFLAGS) $(LDFLAGS) -o $@
+@INSTALL_LIBBFD_FALSE@am_libopcodes_la_rpath =
+@INSTALL_LIBBFD_TRUE@am_libopcodes_la_rpath = -rpath $(bfdlibdir)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/../depcomp
 am__depfiles_maybe = depfiles
@@ -119,6 +125,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-recursive uninstall-recursive
+DATA = $(bfdinclude_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -134,6 +141,8 @@ AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BFD_MACHINES = @BFD_MACHINES@
+BUILD_LIBS = @BUILD_LIBS@
+BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -223,8 +232,11 @@ am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
 archdefs = @archdefs@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
+@INSTALL_LIBBFD_FALSE@bfdincludedir = 
+@INSTALL_LIBBFD_TRUE@bfdincludedir = @bfdincludedir@
+# Empty these so that the respective installation directories will not be created.
+@INSTALL_LIBBFD_FALSE@bfdlibdir = 
+@INSTALL_LIBBFD_TRUE@bfdlibdir = @bfdlibdir@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -252,7 +264,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -275,21 +286,30 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = 1.11 foreign no-dist
 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
-SUBDIRS = po
+
+# Build '.' first so all generated files exist.
+SUBDIRS = . po
 INCDIR = $(srcdir)/../include
 BFDDIR = $(srcdir)/../bfd
 AM_CFLAGS = $(WARN_CFLAGS)
-bfdlib_LTLIBRARIES = libopcodes.la
+COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CFLAGS_FOR_BUILD)
+
+LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
+       $(LDFLAGS_FOR_BUILD) -o $@
+
+libopcodes_la_LDFLAGS = $(am__append_1) -release `cat \
+       ../bfd/libtool-soversion` @SHARED_LDFLAGS@
+@INSTALL_LIBBFD_TRUE@bfdlib_LTLIBRARIES = libopcodes.la
+@INSTALL_LIBBFD_TRUE@bfdinclude_DATA = $(INCDIR)/dis-asm.h
+@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
+@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libopcodes.la
 
 # This is where bfd.h lives.
 BFD_H = ../bfd/bfd.h
 
-# This is where libiberty lives.
-LIBIBERTY = ../libiberty/libiberty.a
-
 # Header files.
 HFILES = \
-       cgen-ops.h cgen-types.h \
        fr30-desc.h fr30-opc.h \
        frv-desc.h frv-opc.h \
        h8500-opc.h \
@@ -319,13 +339,14 @@ HFILES = \
        z8k-opc.h
 
 
-# C source files that correspond to .o's.
-CFILES = \
+# C source files that correspond to .o's ending up in libopcodes
+# for all machines.
+TARGET_LIBOPCODES_CFILES = \
        alpha-dis.c \
        alpha-opc.c \
        arc-dis.c \
-       arc-opc.c \
        arc-ext.c \
+       arc-opc.c \
        arm-dis.c \
        avr-dis.c \
        bfin-dis.c \
@@ -344,9 +365,6 @@ CFILES = \
        d30v-dis.c \
        d30v-opc.c \
        dlx-dis.c \
-       dis-buf.c \
-       dis-init.c \
-       disassemble.c \
        fr30-asm.c \
        fr30-desc.c \
        fr30-dis.c \
@@ -357,8 +375,6 @@ CFILES = \
        frv-dis.c \
        frv-ibld.c \
        frv-opc.c \
-       moxie-dis.c \
-       moxie-opc.c \
        h8300-dis.c \
        h8500-dis.c \
        hppa-dis.c \
@@ -366,19 +382,10 @@ CFILES = \
        i370-opc.c \
        i386-dis.c \
        i386-opc.c \
-       i386-gen.c \
        i860-dis.c \
        i960-dis.c \
        ia64-dis.c \
-       ia64-opc-a.c \
-       ia64-opc-b.c \
-       ia64-opc-f.c \
-       ia64-opc-i.c \
-       ia64-opc-m.c \
-       ia64-opc-d.c \
        ia64-opc.c \
-       ia64-gen.c \
-       ia64-asmtab.c \
        ip2k-asm.c \
        ip2k-desc.c \
        ip2k-dis.c \
@@ -395,6 +402,10 @@ CFILES = \
        lm32-ibld.c \
        lm32-opc.c \
        lm32-opinst.c \
+       m10200-dis.c \
+       m10200-opc.c \
+       m10300-dis.c \
+       m10300-opc.c \
        m32c-asm.c \
        m32c-desc.c \
        m32c-dis.c \
@@ -418,16 +429,15 @@ CFILES = \
        mep-dis.c \
        mep-ibld.c \
        mep-opc.c \
-       mips-dis.c \
        microblaze-dis.c \
+       mips-dis.c \
        mips-opc.c \
        mips16-opc.c \
-       m10200-dis.c \
-       m10200-opc.c \
-       m10300-dis.c \
-       m10300-opc.c \
        mmix-dis.c \
        mmix-opc.c \
+       moxie-dis.c \
+       moxie-opc.c \
+       msp430-dis.c \
        mt-asm.c \
        mt-desc.c \
        mt-dis.c \
@@ -447,9 +457,10 @@ CFILES = \
        pj-opc.c \
        ppc-dis.c \
        ppc-opc.c \
-       s390-mkopc.c \
-       s390-opc.c \
+       rx-decode.c \
+       rx-dis.c \
        s390-dis.c \
+       s390-opc.c \
        score-dis.c \
        score7-dis.c \
        sh-dis.c \
@@ -463,6 +474,7 @@ CFILES = \
        tic4x-dis.c \
        tic54x-dis.c \
        tic54x-opc.c \
+       tic6x-dis.c \
        tic80-dis.c \
        tic80-opc.c \
        v850-dis.c \
@@ -481,166 +493,39 @@ CFILES = \
        xstormy16-opc.c \
        xtensa-dis.c \
        z80-dis.c \
-       z8k-dis.c \
-       z8kgen.c
+       z8k-dis.c
+
 
-ALL_MACHINES = \
-       alpha-dis.lo \
-       alpha-opc.lo \
-       arc-dis.lo \
-       arc-opc.lo \
-       arc-ext.lo \
-       arm-dis.lo \
-       avr-dis.lo \
-       bfin-dis.lo \
-       cgen-asm.lo \
-       cgen-bitset.lo \
-       cgen-dis.lo \
-       cgen-opc.lo \
-       cr16-dis.lo \
-       cr16-opc.lo \
-       cris-dis.lo \
-       cris-opc.lo \
-       crx-dis.lo \
-       crx-opc.lo \
-       d10v-dis.lo \
-       d10v-opc.lo \
-       d30v-dis.lo \
-       d30v-opc.lo \
-       dlx-dis.lo \
-       fr30-asm.lo \
-       fr30-desc.lo \
-       fr30-dis.lo \
-       fr30-ibld.lo \
-       fr30-opc.lo \
-       frv-asm.lo \
-       frv-desc.lo \
-       frv-dis.lo \
-       frv-ibld.lo \
-       frv-opc.lo \
-       moxie-dis.lo \
-       moxie-opc.lo \
-       h8300-dis.lo \
-       h8500-dis.lo \
-       hppa-dis.lo \
-       i386-dis.lo \
-       i386-opc.lo \
-       i370-dis.lo \
-       i370-opc.lo \
-       i860-dis.lo \
-       i960-dis.lo \
-       ia64-dis.lo \
-       ia64-opc.lo \
-       ip2k-asm.lo \
-       ip2k-desc.lo \
-       ip2k-dis.lo \
-       ip2k-ibld.lo \
-       ip2k-opc.lo \
-       iq2000-asm.lo \
-       iq2000-desc.lo \
-       iq2000-dis.lo \
-       iq2000-ibld.lo \
-       iq2000-opc.lo \
-       lm32-asm.lo \
-       lm32-desc.lo \
-       lm32-dis.lo \
-       lm32-ibld.lo \
-       lm32-opc.lo \
-       lm32-opinst.lo \
-       m32c-asm.lo \
-       m32c-desc.lo \
-       m32c-dis.lo \
-       m32c-ibld.lo \
-       m32c-opc.lo \
-       m32r-asm.lo \
-       m32r-desc.lo \
-       m32r-dis.lo \
-       m32r-ibld.lo \
-       m32r-opc.lo \
-       m32r-opinst.lo \
-       m68hc11-dis.lo \
-       m68hc11-opc.lo \
-       m68k-dis.lo \
-       m68k-opc.lo \
-       m88k-dis.lo \
-       m10200-dis.lo \
-       m10200-opc.lo \
-       m10300-dis.lo \
-       m10300-opc.lo \
-       maxq-dis.lo \
-       mcore-dis.lo \
-       mep-asm.lo \
-       mep-desc.lo \
-       mep-dis.lo \
-       mep-ibld.lo \
-       mep-opc.lo \
-       mips-dis.lo \
-       microblaze-dis.lo \
-       mips-opc.lo \
-       mips16-opc.lo \
-       mmix-dis.lo \
-       mmix-opc.lo \
-       msp430-dis.lo \
-       mt-asm.lo \
-       mt-desc.lo \
-       mt-dis.lo \
-       mt-ibld.lo \
-       mt-opc.lo \
-       ns32k-dis.lo \
-       openrisc-asm.lo \
-       openrisc-desc.lo \
-       openrisc-dis.lo \
-       openrisc-ibld.lo \
-       openrisc-opc.lo \
-       or32-dis.lo \
-       or32-opc.lo \
-       pdp11-dis.lo \
-       pdp11-opc.lo \
-       pj-dis.lo \
-       pj-opc.lo \
-       ppc-dis.lo \
-       ppc-opc.lo \
-       s390-dis.lo \
-       s390-opc.lo \
-       score-dis.lo \
-       score7-dis.lo \
-       sh-dis.lo \
-       sh64-dis.lo \
-       sh64-opc.lo \
-       sparc-dis.lo \
-       sparc-opc.lo \
-       spu-dis.lo \
-       spu-opc.lo \
-       tic30-dis.lo \
-       tic4x-dis.lo \
-       tic54x-dis.lo \
-       tic54x-opc.lo \
-       tic80-dis.lo \
-       tic80-opc.lo \
-       v850-dis.lo \
-       v850-opc.lo \
-       vax-dis.lo \
-       w65-dis.lo \
-       xc16x-asm.lo \
-       xc16x-desc.lo \
-       xc16x-dis.lo \
-       xc16x-ibld.lo \
-       xc16x-opc.lo \
-       xstormy16-asm.lo \
-       xstormy16-desc.lo \
-       xstormy16-dis.lo \
-       xstormy16-ibld.lo \
-       xstormy16-opc.lo \
-       xtensa-dis.lo \
-       z80-dis.lo \
-       z8k-dis.lo
+# C source files that correspond to .o's ending up in libopcodes.
+LIBOPCODES_CFILES = \
+       $(TARGET_LIBOPCODES_CFILES) \
+       dis-buf.c \
+       dis-init.c \
+       disassemble.c
+
+
+# C source files that correspond to .o's.
+CFILES = \
+       $(LIBOPCODES_CFILES) \
+       i386-gen.c \
+       ia64-asmtab.c \
+       ia64-gen.c \
+       ia64-opc-a.c \
+       ia64-opc-b.c \
+       ia64-opc-f.c \
+       ia64-opc-i.c \
+       ia64-opc-m.c \
+       ia64-opc-d.c \
+       s390-mkopc.c \
+       z8kgen.c
 
+ALL_MACHINES = $(TARGET_LIBOPCODES_CFILES:.c=.lo)
 OFILES = @BFD_MACHINES@
 
 # We should reconfigure whenever bfd/configure.in changes, because
 # that's where the version number in Makefile comes from.
 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
-INCLUDES = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
+AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
 libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
 # It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD.
 # Unfortunately this causes libtool to add -L$(libdir), referring to the
@@ -650,9 +535,8 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
 # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
 libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
 libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
-libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
 # Allow dependency tracking to work on all the source files.
-EXTRA_libopcodes_la_SOURCES = $(CFILES)
+EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES)
 
 # libtool will build .libs/libopcodes.a.  We create libopcodes.a in
 # the build directory so that we don't have to convert all the
@@ -676,31 +560,45 @@ CGENDEPS = \
        $(CGENDIR)/opc-opinst.scm \
        cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = fr30 frv ip2k m32c m32r mep mt openrisc xc16x xstormy16
+CGEN_CPUS = fr30 frv ip2k iq2000 lm32 m32c m32r mep mt openrisc xc16x xstormy16
+@CGEN_MAINT_FALSE@FR30_DEPS = 
+@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
+@CGEN_MAINT_FALSE@FRV_DEPS = 
+@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
 @CGEN_MAINT_FALSE@IP2K_DEPS = 
 @CGEN_MAINT_TRUE@IP2K_DEPS = stamp-ip2k
+@CGEN_MAINT_FALSE@IQ2000_DEPS = 
+@CGEN_MAINT_TRUE@IQ2000_DEPS = stamp-iq2000
 @CGEN_MAINT_FALSE@LM32_DEPS = 
 @CGEN_MAINT_TRUE@LM32_DEPS = stamp-lm32
 @CGEN_MAINT_FALSE@M32C_DEPS = 
 @CGEN_MAINT_TRUE@M32C_DEPS = stamp-m32c
 @CGEN_MAINT_FALSE@M32R_DEPS = 
 @CGEN_MAINT_TRUE@M32R_DEPS = stamp-m32r
-@CGEN_MAINT_FALSE@FR30_DEPS = 
-@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
-@CGEN_MAINT_FALSE@FRV_DEPS = 
-@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
 @CGEN_MAINT_FALSE@MEP_DEPS = 
 @CGEN_MAINT_TRUE@MEP_DEPS = stamp-mep
 @CGEN_MAINT_FALSE@MT_DEPS = 
 @CGEN_MAINT_TRUE@MT_DEPS = stamp-mt
 @CGEN_MAINT_FALSE@OPENRISC_DEPS = 
 @CGEN_MAINT_TRUE@OPENRISC_DEPS = stamp-openrisc
-@CGEN_MAINT_FALSE@IQ2000_DEPS = 
-@CGEN_MAINT_TRUE@IQ2000_DEPS = stamp-iq2000
 @CGEN_MAINT_FALSE@XC16X_DEPS = 
 @CGEN_MAINT_TRUE@XC16X_DEPS = stamp-xc16x
 @CGEN_MAINT_FALSE@XSTORMY16_DEPS = 
 @CGEN_MAINT_TRUE@XSTORMY16_DEPS = stamp-xstormy16
+MOSTLYCLEANFILES = i386-gen$(EXEEXT_FOR_BUILD) ia64-gen$(EXEEXT_FOR_BUILD) \
+       s390-mkopc$(EXEEXT_FOR_BUILD) z8kgen$(EXEEXT_FOR_BUILD) \
+       opc2c$(EXEEXT_FOR_BUILD)
+
+MAINTAINERCLEANFILES = $(srcdir)/i386-tbl.h $(srcdir)/i386-init.h \
+       $(srcdir)/ia64-asmtab.c s390-opc.tab $(srcdir)/z8k-opc.h \
+       $(srcdir)/rx-decode.c
+
+
+# Use a helper variable for the dependencies to avoid 'make' issues
+# with continuations in comments, as @MAINT@ can be expanded to '#'.
+ia64_asmtab_deps = ia64-gen$(EXEEXT_FOR_BUILD) ia64-ic.tbl \
+       ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
+
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
@@ -762,6 +660,28 @@ po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
 
 clean-noinstLIBRARIES:
        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+install-bfdlibLTLIBRARIES: $(bfdlib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(bfdlibdir)" || $(MKDIR_P) "$(DESTDIR)$(bfdlibdir)"
+       @list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(bfdlibdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(bfdlibdir)"; \
+       }
+
+uninstall-bfdlibLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(bfdlibdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(bfdlibdir)/$$f"; \
+       done
 
 clean-bfdlibLTLIBRARIES:
        -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
@@ -771,8 +691,17 @@ clean-bfdlibLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
 libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES) 
-       $(libopcodes_la_LINK) -rpath $(bfdlibdir) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS)
+       $(libopcodes_la_LINK) $(am_libopcodes_la_rpath) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -822,19 +751,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i370-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i370-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-gen.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i860-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i960-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-asmtab.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-gen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-a.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-b.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-d.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-f.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-i.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc-m.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip2k-asm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip2k-desc.Plo@am__quote@
@@ -888,6 +808,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmix-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moxie-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moxie-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msp430-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt-asm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt-desc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt-dis.Plo@am__quote@
@@ -907,8 +828,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pj-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx-decode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s390-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s390-mkopc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s390-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score7-dis.Plo@am__quote@
@@ -923,6 +845,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic4x-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic54x-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic54x-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic6x-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic80-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tic80-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v850-dis.Plo@am__quote@
@@ -942,7 +865,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtensa-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/z80-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/z8k-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/z8kgen.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -973,6 +895,26 @@ clean-libtool:
 
 distclean-libtool:
        -rm -f libtool config.lt
+install-bfdincludeDATA: $(bfdinclude_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(bfdincludedir)" || $(MKDIR_P) "$(DESTDIR)$(bfdincludedir)"
+       @list='$(bfdinclude_DATA)'; test -n "$(bfdincludedir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bfdincludedir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(bfdincludedir)" || exit $$?; \
+       done
+
+uninstall-bfdincludeDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bfdinclude_DATA)'; test -n "$(bfdincludedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bfdincludedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bfdincludedir)" && rm -f $$files
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -1110,10 +1052,10 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) config.h
 installdirs: installdirs-recursive
 installdirs-am:
-       for dir in "$(DESTDIR)$(bfdlibdir)"; do \
+       for dir in "$(DESTDIR)$(bfdlibdir)" "$(DESTDIR)$(bfdincludedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
@@ -1131,6 +1073,7 @@ install-strip:
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
 
 clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1142,10 +1085,11 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-recursive
 
 clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
-       clean-noinstLIBRARIES mostlyclean-am
+       clean-noinstLIBRARIES clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -1166,7 +1110,7 @@ info: info-recursive
 
 info-am:
 
-install-data-am: install-bfdlibLTLIBRARIES
+install-data-am: install-bfdincludeDATA install-bfdlibLTLIBRARIES
 
 install-dvi: install-dvi-recursive
 
@@ -1214,7 +1158,7 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-bfdlibLTLIBRARIES
+uninstall-am: uninstall-bfdincludeDATA uninstall-bfdlibLTLIBRARIES
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
        ctags-recursive install-am install-strip tags-recursive
@@ -1222,19 +1166,20 @@ uninstall-am: uninstall-bfdlibLTLIBRARIES
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean \
        clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
-       clean-noinstLIBRARIES ctags ctags-recursive distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-libtool distclean-tags dvi dvi-am html html-am info \
-       info-am install install-am install-bfdlibLTLIBRARIES \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs installdirs-am \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
-       uninstall-bfdlibLTLIBRARIES
+       clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
+       ctags-recursive distclean distclean-compile distclean-generic \
+       distclean-hdr distclean-libtool distclean-tags dvi dvi-am html \
+       html-am info info-am install install-am install-bfdincludeDATA \
+       install-bfdlibLTLIBRARIES install-data install-data-am \
+       install-dvi install-dvi-am install-exec install-exec-am \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-bfdincludeDATA uninstall-bfdlibLTLIBRARIES
 
 
 disassemble.lo: disassemble.c
@@ -1258,30 +1203,6 @@ po/POTFILES.in: @MAINT@ Makefile
        for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
          && mv tmp $(srcdir)/po/POTFILES.in
 
-install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libopcodes
-       @$(NORMAL_INSTALL)
-
-uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libopcodes
-       @$(NORMAL_UNINSTALL)
-
-.PHONY: install_libopcodes uninstall_libopcodes
-install_libopcodes: $(bfdlib_LTLIBRARIES)
-       $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
-       $(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
-       @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
-           $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
-         else :; fi; \
-       done
-       $(INSTALL_DATA) $(INCDIR)/dis-asm.h $(DESTDIR)$(bfdincludedir)/dis-asm.h
-
-uninstall_libopcodes:
-       list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
-         $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \
-       done
-       rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h
-
 run-cgen:
        $(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
          $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) $(archfile) $(opcfile) \
@@ -1298,12 +1219,34 @@ run-cgen-all:
 .PHONY: run-cgen-all
 
 # For now, require developers to configure with --enable-cgen-maint.
+
+$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
+       @true
+stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
+       $(MAKE) run-cgen arch=fr30 prefix=fr30 options= \
+               archfile=$(CPUDIR)/fr30.cpu opcfile=$(CPUDIR)/fr30.opc extrafiles=
+
+$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
+       @true
+stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
+       $(MAKE) run-cgen arch=frv prefix=frv options= \
+               archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
+
 $(srcdir)/ip2k-desc.h $(srcdir)/ip2k-desc.c $(srcdir)/ip2k-opc.h $(srcdir)/ip2k-opc.c $(srcdir)/ip2k-ibld.c $(srcdir)/ip2k-asm.c $(srcdir)/ip2k-dis.c: $(IP2K_DEPS)
        @true
 stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
        $(MAKE) run-cgen arch=ip2k prefix=ip2k options= \
                archfile=$(CPUDIR)/ip2k.cpu opcfile=$(CPUDIR)/ip2k.opc extrafiles=
 
+$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
+       @true
+stamp-iq2000: $(CGENDEPS) $(srcdir)/../cpu/iq2000.cpu \
+               $(srcdir)/../cpu/iq2000.opc $(srcdir)/../cpu/iq2000m.cpu \
+               $(srcdir)/../cpu/iq10.cpu
+       $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
+               archfile=$(srcdir)/../cpu/iq2000.cpu \
+               opcfile=$(srcdir)/../cpu/iq2000.opc extrafiles=
+
 $(srcdir)lm32-desc.h $(srcdir)/lm32-desc.c $(srcdir)/lm32-opc.h $(srcdir)/lm32-opc.c $(srcdir)/lm32-ibld.c $(srcdir)/lm32-opinst.c $(srcdir)/lm32-asm.c $(srcdir)/lm32-dis.c: $(LM32_DEPS)
        @true
 stamp-lm32: $(CGENDEPS) $(srcdir)/../cpu/lm32.cpu $(srcdir)/../cpu/lm32.opc
@@ -1326,18 +1269,6 @@ stamp-m32r: $(CGENDEPS) $(srcdir)/../cpu/m32r.cpu $(srcdir)/../cpu/m32r.opc
                archfile=$(srcdir)/../cpu/m32r.cpu \
                opcfile=$(srcdir)/../cpu/m32r.opc extrafiles=opinst
 
-$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
-       @true
-stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
-       $(MAKE) run-cgen arch=fr30 prefix=fr30 options= \
-               archfile=$(CPUDIR)/fr30.cpu opcfile=$(CPUDIR)/fr30.opc extrafiles=
-
-$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
-       @true
-stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
-       $(MAKE) run-cgen arch=frv prefix=frv options= \
-               archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
-
 $(srcdir)/mep-desc.h $(srcdir)/mep-desc.c $(srcdir)/mep-opc.h $(srcdir)/mep-opc.c $(srcdir)/mep-ibld.c $(srcdir)/mep-asm.c $(srcdir)/mep-dis.c: $(MEP_DEPS)
        @true
 stamp-mep: $(CGENDEPS) $(CPUDIR)/mep.cpu $(CPUDIR)/mep-default.cpu $(CPUDIR)/mep-core.cpu $(CPUDIR)/mep-h1.cpu $(CPUDIR)/mep-ext-cop.cpu $(CPUDIR)/mep-sample-ucidsp.cpu $(CPUDIR)/mep-rhcop.cpu $(CPUDIR)/mep-fmax.cpu $(CPUDIR)/mep.opc
@@ -1357,14 +1288,13 @@ stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
        $(MAKE) run-cgen arch=openrisc prefix=openrisc options= \
                archfile=$(CPUDIR)/openrisc.cpu opcfile=$(CPUDIR)/openrisc.opc extrafiles=
 
-$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
+$(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS)
        @true
-stamp-iq2000: $(CGENDEPS) $(srcdir)/../cpu/iq2000.cpu \
-               $(srcdir)/../cpu/iq2000.opc $(srcdir)/../cpu/iq2000m.cpu \
-               $(srcdir)/../cpu/iq10.cpu
-       $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
-               archfile=$(srcdir)/../cpu/iq2000.cpu \
-               opcfile=$(srcdir)/../cpu/iq2000.opc extrafiles=
+stamp-xc16x: $(CGENDEPS) $(srcdir)/../cpu/xc16x.cpu $(srcdir)/../cpu/xc16x.opc
+       $(MAKE) run-cgen arch=xc16x prefix=xc16x options= \
+               archfile=$(srcdir)/../cpu/xc16x.cpu \
+               opcfile=$(srcdir)/../cpu/xc16x.opc \
+               extrafiles=
 
 $(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
        @true
@@ -1372,37 +1302,65 @@ stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
        $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= \
                archfile=$(CPUDIR)/xstormy16.cpu opcfile=$(CPUDIR)/xstormy16.opc extrafiles=
 
-$(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS)
-       @true
-stamp-xc16x: $(CGENDEPS) $(CPUDIR)/xc16x.cpu $(CPUDIR)/xc16x.opc
-       $(MAKE) run-cgen arch=xc16x prefix=xc16x options= \
-               archfile=$(CPUDIR)/xc16x.cpu opcfile=$(CPUDIR)/xc16x.opc extrafiles=
+i386-gen$(EXEEXT_FOR_BUILD): i386-gen.o $(BUILD_LIB_DEPS)
+       $(LINK_FOR_BUILD) i386-gen.o $(BUILD_LIBS)
 
-i386-gen: i386-gen.o
-       $(LINK) i386-gen.o $(LIBIBERTY)
+i386-gen.o: i386-gen.c i386-opc.h $(srcdir)/../include/opcode/i386.h \
+       $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h $(INCDIR)/hashtab.h \
+       $(INCDIR)/libiberty.h $(INCDIR)/opcode/i386.h $(INCDIR)/safe-ctype.h \
+       config.h i386-opc.h sysdep.h
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/i386-gen.c
 
 $(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h 
        @echo $@
 
-$(srcdir)/i386-init.h: @MAINT@ i386-gen i386-opc.tbl i386-reg.tbl
-       ./i386-gen --srcdir $(srcdir)
+$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl
+       ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)
 
-ia64-gen: ia64-gen.o
-       $(LINK) ia64-gen.o $(LIBIBERTY)
+i386-opc.lo: $(srcdir)/i386-tbl.h
 
-# Don't wrap the line below, as @MAINT@ can be expanded to '#'.
-# Some make versions don't handle line continuations in comments.
-$(srcdir)/ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
-       ./ia64-gen --srcdir $(srcdir) > $@
+ia64-gen$(EXEEXT_FOR_BUILD): ia64-gen.o $(BUILD_LIB_DEPS)
+       $(LINK_FOR_BUILD) ia64-gen.o $(BUILD_LIBS)
 
-s390-mkopc: s390-mkopc.c
-       $(CC_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+ia64-gen.o: ia64-gen.c $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h \
+       $(INCDIR)/libiberty.h $(INCDIR)/opcode/ia64.h $(INCDIR)/safe-ctype.h \
+       $(INCDIR)/symcat.h config.h ia64-opc-a.c ia64-opc-b.c \
+       ia64-opc-d.c ia64-opc-f.c ia64-opc-i.c ia64-opc-m.c \
+       ia64-opc-x.c ia64-opc.h sysdep.h
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/ia64-gen.c
+$(srcdir)/ia64-asmtab.c: @MAINT@ $(ia64_asmtab_deps)
+       ./ia64-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir) > $@
 
-s390-opc.tab: s390-mkopc s390-opc.txt
-       ./s390-mkopc < $(srcdir)/s390-opc.txt > s390-opc.tab
+ia64-opc.lo: $(srcdir)/ia64-asmtab.c
+
+$(srcdir)/rx-decode.c: @MAINT@ $(srcdir)/rx-decode.opc opc2c$(EXEEXT_FOR_BUILD)
+       ./opc2c$(EXEEXT_FOR_BUILD) $(srcdir)/rx-decode.opc > $(srcdir)/rx-decode.c
+
+opc2c$(EXEEXT_FOR_BUILD): opc2c.o $(BUILD_LIBS_DEPS)
+       $(LINK_FOR_BUILD) opc2c.o $(BUILD_LIBS)
+
+opc2c.o: opc2c.c $(INCDIR)/libiberty.h
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/opc2c.c
+
+s390-mkopc$(EXEEXT_FOR_BUILD): s390-mkopc.c
+       $(COMPILE_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+
+s390-opc.tab: s390-mkopc$(EXEEXT_FOR_BUILD) s390-opc.txt
+       ./s390-mkopc$(EXEEXT_FOR_BUILD) < $(srcdir)/s390-opc.txt > s390-opc.tab
 
 s390-opc.lo: s390-opc.tab
 
+z8kgen$(EXEEXT_FOR_BUILD): z8kgen.o $(BUILD_LIB_DEPS)
+       $(LINK_FOR_BUILD) z8kgen.o $(BUILD_LIBS)
+
+z8kgen.o: z8kgen.c
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/z8kgen.c
+
+$(srcdir)/z8k-opc.h: @MAINT@ z8kgen$(EXEEXT_FOR_BUILD)
+       ./z8kgen$(EXEEXT_FOR_BUILD) -a > $@
+
+z8k-dis.lo: $(srcdir)/z8k-opc.h
+
 sh-dis.lo: sh-dis.c
 @am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c
 @am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo