## Process this file with automake to generate Makefile.in
#
-# Copyright (C) 2012-2019 Free Software Foundation, Inc.
+# Copyright (C) 2012-2021 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Header files.
HFILES = \
aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
+ bpf-desc.h bpf-opc.h \
+ cris-desc.h cris-opc.h \
epiphany-desc.h epiphany-opc.h \
fr30-desc.h fr30-opc.h \
frv-desc.h frv-opc.h \
# C source files that correspond to .o's ending up in libopcodes
# for all machines.
-TARGET_LIBOPCODES_CFILES = \
+TARGET64_LIBOPCODES_CFILES = \
aarch64-asm.c \
aarch64-asm-2.c \
aarch64-dis.c \
aarch64-opc-2.c \
alpha-dis.c \
alpha-opc.c \
+ ia64-dis.c \
+ ia64-opc.c \
+ loongarch-opc.c \
+ loongarch-dis.c \
+ loongarch-coder.c \
+ mips-dis.c \
+ mips-opc.c \
+ mips16-opc.c \
+ micromips-opc.c \
+ mmix-dis.c \
+ mmix-opc.c \
+ nfp-dis.c \
+ riscv-dis.c \
+ riscv-opc.c
+
+TARGET32_LIBOPCODES_CFILES = \
arc-dis.c \
arc-ext.c \
arc-opc.c \
arm-dis.c \
avr-dis.c \
bfin-dis.c \
+ bpf-asm.c \
+ bpf-desc.c \
+ bpf-dis.c \
+ bpf-ibld.c \
+ bpf-opc.c \
cgen-asm.c \
cgen-bitset.c \
cgen-dis.c \
cgen-opc.c \
cr16-dis.c \
cr16-opc.c \
+ cris-desc.c \
cris-dis.c \
cris-opc.c \
crx-dis.c \
hppa-dis.c \
i386-dis.c \
i386-opc.c \
- ia64-dis.c \
- ia64-opc.c \
ip2k-asm.c \
ip2k-desc.c \
ip2k-dis.c \
m68k-dis.c \
m68k-opc.c \
s12z-dis.c \
+ s12z-opc.c \
mcore-dis.c \
mep-asm.c \
mep-desc.c \
mep-opc.c \
metag-dis.c \
microblaze-dis.c \
- micromips-opc.c \
- mips-dis.c \
- mips-opc.c \
- mips16-opc.c \
- mmix-dis.c \
- mmix-opc.c \
moxie-dis.c \
moxie-opc.c \
msp430-decode.c \
mt-opc.c \
nds32-asm.c \
nds32-dis.c \
- nfp-dis.c \
nios2-dis.c \
nios2-opc.c \
ns32k-dis.c \
ppc-opc.c \
pru-dis.c \
pru-opc.c \
- riscv-dis.c \
- riscv-opc.c \
rl78-decode.c \
rl78-dis.c \
rx-decode.c \
tic54x-dis.c \
tic54x-opc.c \
tic6x-dis.c \
- tic80-dis.c \
- tic80-opc.c \
tilegx-dis.c \
tilegx-opc.c \
tilepro-dis.c \
# C source files that correspond to .o's ending up in libopcodes.
LIBOPCODES_CFILES = \
- $(TARGET_LIBOPCODES_CFILES) \
+ $(TARGET32_LIBOPCODES_CFILES) \
+ $(TARGET64_LIBOPCODES_CFILES) \
dis-buf.c \
dis-init.c \
disassemble.c
s390-mkopc.c \
z8kgen.c
-ALL_MACHINES = $(TARGET_LIBOPCODES_CFILES:.c=.lo)
+ALL32_MACHINES = $(TARGET32_LIBOPCODES_CFILES:.c=.lo)
+ALL64_MACHINES = $(TARGET64_LIBOPCODES_CFILES:.c=.lo)
OFILES = @BFD_MACHINES@
endif
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
-# planned install directory of libbfd. This can cause us to pick up an
-# old version of libbfd, or to pick up libbfd for the wrong architecture
-# if host != build. So for building with shared libraries we use a
-# 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@
CGENDIR = @cgendir@
CPUDIR = $(srcdir)/../cpu
-CGEN = "`if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` -l ${cgendir}/guile.scm -s"
+GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGEN = "$(GUILE) -l ${cgendir}/guile.scm -s"
CGENFLAGS = -v
CGENDEPS = \
$(CGENDIR)/opc-opinst.scm \
cgen-asm.in cgen-dis.in cgen-ibld.in
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
if CGEN_MAINT
+BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
EPIPHANY_DEPS = stamp-epiphany
FR30_DEPS = stamp-fr30
FRV_DEPS = stamp-frv
XC16X_DEPS = stamp-xc16x
XSTORMY16_DEPS = stamp-xstormy16
else
+BPF_DEPS =
+CRIS_DEPS =
EPIPHANY_DEPS =
FR30_DEPS =
FRV_DEPS =
# For now, require developers to configure with --enable-cgen-maint.
+$(srcdir)/bpf-desc.h $(srcdir)/bpf-desc.c $(srcdir)/bpf-opc.h \
+ $(srcdir)/bpf-opc.c $(srcdir)/bpf-ibld.c \
+ $(srcdir)/bpf-asm.c $(srcdir)/bpf-dis.c: $(BPF_DEPS)
+ @true
+
+stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
+ $(MAKE) run-cgen arch=bpf prefix=bpf \
+ archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
+
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h: $(CRIS_DEPS)
+ @true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+ $(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+ $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+ "$(options)" "$(extrafiles)"
+ touch $@
+
$(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
@echo $@
$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - \
+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - \
< $(srcdir)/i386-opc.tbl \
| ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)