@@ -33,6 +33,7 @@ AM_MAKEFLAGS = SIM_PRIMARY_TARGET=$(SIM_PRIMARY_TARGET)
## be used consistently in local.mk files we include below.
pkginclude_HEADERS =
check_PROGRAMS =
+noinst_PROGRAMS =
noinst_LIBRARIES =
EXTRA_PROGRAMS =
@@ -85,9 +86,19 @@ include igen/local.mk
endif
include testsuite/local.mk
+## Arch includes must come after common/local.mk.
+if SIM_ENABLE_ARCH_aarch64
+include aarch64/local.mk
+endif
if SIM_ENABLE_ARCH_arm
include arm/local.mk
endif
+if SIM_ENABLE_ARCH_avr
+include avr/local.mk
+endif
+if SIM_ENABLE_ARCH_bfin
+include bfin/local.mk
+endif
if SIM_ENABLE_ARCH_bpf
include bpf/local.mk
endif
@@ -103,9 +114,18 @@ endif
if SIM_ENABLE_ARCH_erc32
include erc32/local.mk
endif
+if SIM_ENABLE_ARCH_examples
+include example-synacor/local.mk
+endif
if SIM_ENABLE_ARCH_frv
include frv/local.mk
endif
+if SIM_ENABLE_ARCH_ft32
+include ft32/local.mk
+endif
+if SIM_ENABLE_ARCH_h8300
+include h8300/local.mk
+endif
if SIM_ENABLE_ARCH_iq2000
include iq2000/local.mk
endif
@@ -121,18 +141,39 @@ endif
if SIM_ENABLE_ARCH_m68hc11
include m68hc11/local.mk
endif
+if SIM_ENABLE_ARCH_mcore
+include mcore/local.mk
+endif
+if SIM_ENABLE_ARCH_microblaze
+include microblaze/local.mk
+endif
+if SIM_ENABLE_ARCH_mips
+include mips/local.mk
+endif
if SIM_ENABLE_ARCH_mn10300
include mn10300/local.mk
endif
if SIM_ENABLE_ARCH_moxie
include moxie/local.mk
endif
+if SIM_ENABLE_ARCH_msp430
+include msp430/local.mk
+endif
if SIM_ENABLE_ARCH_or1k
include or1k/local.mk
endif
if SIM_ENABLE_ARCH_ppc
include ppc/local.mk
endif
+if SIM_ENABLE_ARCH_pru
+include pru/local.mk
+endif
+if SIM_ENABLE_ARCH_riscv
+include riscv/local.mk
+endif
+if SIM_ENABLE_ARCH_rl78
+include rl78/local.mk
+endif
if SIM_ENABLE_ARCH_rx
include rx/local.mk
endif
@@ -143,6 +184,15 @@ if SIM_ENABLE_ARCH_v850
include v850/local.mk
endif
+## Helper targets for running make from the top-level when some subdirs still
+## have Makefiles in subdirs.
+
+%/libsim.a: | $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
+%/nrun.o: common/nrun.c | %/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
all-recursive: $(SIM_ALL_RECURSIVE_DEPS)
install-data-local: installdirs $(SIM_INSTALL_DATA_LOCAL_DEPS)
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2015-2022 Free Software Foundation, Inc.
+## Contributed by Red Hat.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -1,6 +1,7 @@
## See sim/Makefile.am
##
## Copyright (C) 1995-2022 Free Software Foundation, Inc.
+## Written by Cygnus Support.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -15,5 +16,13 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/README
new file mode 100644
@@ -0,0 +1,24 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2009-2022 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2005-2022 Free Software Foundation, Inc.
+## Written by Analog Devices, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -15,6 +15,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/eng-le.h \
%D%/mloop-le.c \
@@ -223,18 +223,13 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
RUNTESTFLAGS =
-all: libsim.a run$(EXEEXT)
+all: libsim.a $(SIM_RUN_OBJS)
libsim.a: $(LIB_OBJS)
$(SILENCE) rm -f libsim.a
$(ECHO_AR) $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
$(ECHO_RANLIB) $(RANLIB) libsim.a
-run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
- $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \
- $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
-
#
# Dependency tracking. Most of this is conditional on GNU Make being
# found by configure; if GNU Make is not found, we fall back to a
@@ -30,7 +30,8 @@ SIM_ALL_RECURSIVE_DEPS += \
## NB: libcommon.a isn't used directly by ports. We need a target for common
## objects to be a part of, and ports use the individual objects directly.
-noinst_LIBRARIES += %D%/libcommon.a
+SIM_COMMON_LIB = %D%/libcommon.a
+noinst_LIBRARIES += $(SIM_COMMON_LIB)
%C%_libcommon_a_SOURCES = \
%D%/callback.c \
%D%/portability.c \
@@ -50,3 +51,19 @@ noinst_LIBRARIES += %D%/libcommon.a
CLEANFILES += \
%D%/version.c %D%/version.c-stamp
+
+#
+# For subdirs.
+#
+
+LIBIBERTY_LIB = ../libiberty/libiberty.a
+BFD_LIB = ../bfd/libbfd.la
+OPCODES_LIB = ../opcodes/libopcodes.la
+
+SIM_COMMON_LIBS = \
+ $(SIM_COMMON_LIB) \
+ $(BFD_LIB) \
+ $(OPCODES_LIB) \
+ $(LIBIBERTY_LIB) \
+ $(LIBGNU) \
+ $(LIBGNU_EXTRA_LIBS)
@@ -156,6 +156,7 @@ if test "${enable_sim}" != no; then
SIM_AC_TOOLCHAIN_FOR_TARGET(example-synacor)
SIM_BUILD_TARGET([example-synacor])
fi
+ AM_CONDITIONAL([SIM_ENABLE_ARCH_examples], [test "${enable_example_sims}" = "yes"])
fi
AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"])
AM_CONDITIONAL([ENABLE_SIM], [test -n "$SIM_SUBDIRS"])
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/gencode$(EXEEXT) \
%D%/simops.h \
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
## rvdummy is just used for testing -- it runs on the same host as `run`.
## It does nothing if --enable-sim-hardware isn't active.
%C%_rvdummy_SOURCES = %D%/rvdummy.c
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/gencode$(EXEEXT) \
%D%/simops.h \
@@ -24,7 +24,6 @@ SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
SIM_RUN_OBJS = sis.o
SIM_EXTRA_CFLAGS = $(READLINE_CFLAGS)
SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB)
-SIM_EXTRA_CLEAN = clean-sis
# UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to
# CFLAGS if faster (infinite) UART speed is desired. Might affect the
@@ -32,11 +31,3 @@ SIM_EXTRA_CLEAN = clean-sis
SIM_EXTRA_CFLAGS += -DFAST_UART -I$(srcroot)
## COMMON_POST_CONFIG_FRAG
-
-all: sis$(EXEEXT)
-sis$(EXEEXT): run$(EXEEXT)
- $(SILENCE) rm -f $@
- $(ECHO_GEN) ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@
-
-clean-sis:
- rm -f sis
@@ -1,6 +1,8 @@
## See sim/Makefile.am
##
## Copyright (C) 1993-2022 Free Software Foundation, Inc.
+## Written by Cygnus Support
+## Modified by J.Gaisler ESA/ESTEC
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -15,6 +17,21 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/sis.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS) $(READLINE_LIB) $(TERMCAP_LIB)
+
+%D%/sis$(EXEEXT): %D%/run$(EXEEXT)
+ $(AM_V_GEN)ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@
+
+## Helper targets for running make from the top-level due to run's sis.o.
+%D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
+noinst_PROGRAMS += %D%/run %D%/sis
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/README.erc32 %D%/README.gdb %D%/README.sis
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2005-2022 Free Software Foundation, Inc.
+## Written by Mike Frysinger <vapier@gentoo.org>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/README
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2008-2022 Free Software Foundation, Inc.
+## Written by FTDI
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 1990-2022 Free Software Foundation, Inc.
+## Written by Cygnus Support.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/eng.h \
%D%/mloop.c \
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/eng.h \
%D%/mloop.c \
@@ -16,6 +16,18 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/main.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
+## Helper targets for running make from the top-level due to run's main.o.
+%D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
%C%_BUILD_OUTPUTS = \
%D%/opc2c$(EXEEXT) \
%D%/m32c.c \
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/eng.h \
%D%/mloop.c \
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/gencode$(EXEEXT) \
%D%/m68hc11int.c \
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 1990-2022 Free Software Foundation, Inc.
+## Written by Cygnus Solutions.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 1990-2022 Free Software Foundation, Inc.
+## Written by Cygnus Solutions.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 1995-2022 Free Software Foundation, Inc.
+## Written by Cygnus Support.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILT_SRC_FROM_IGEN = \
%D%/icache.h \
%D%/icache.c \
@@ -1,6 +1,7 @@
## See sim/Makefile.am
##
-## Copyright (C) 1993-2022 Free Software Foundation, Inc.
+## Copyright (C) 2008-2022 Free Software Foundation, Inc.
+## Written by Anthony Green
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -15,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
dtbdir = $(datadir)/gdb/dtb
dtb_DATA = %D%/moxie-gdb.dtb
@@ -30,10 +39,3 @@ dtb_DATA = %D%/moxie-gdb.dtb
echo "tree compiler tool (dtc) is missing. Install the tool to "; \
echo "update the device tree blob."; \
fi
-
-# Rule to create the .dirstamp file (on which moxie-gdb.dtb depends)
-# as automake fails to automatically create this rule for _DATA items.
-%D%/$(am__dirstamp):
- @$(MKDIR_P) %D%
- @: >%D%/$(am__dirstamp)
-DISTCLEANFILES += %D%/$(am__dirstamp)
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2012-2022 Free Software Foundation, Inc.
+## Written by Red Hat Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
@@ -15,6 +15,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/README
@@ -37,10 +37,6 @@ include ../arch-subdir.mk
prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(libdir)/$(target_alias)
-
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
@@ -135,7 +131,7 @@ BFD_LIB = ../../bfd/libbfd.la
TARGETLIB = libsim.a
-all: run$(EXEEXT) $(TARGETLIB) $(GDB_OBJ)
+all: main.o $(TARGETLIB) $(GDB_OBJ)
.c.o:
$(ECHO_CC) $(CC) -c $(STD_CFLAGS) $<
@@ -518,14 +514,6 @@ PACKAGE_SRC = pk_disklabel.c
PACKAGE_OBJ = $(PACKAGE_SRC:.c=.o)
-psim$(EXEEXT): $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB)
- $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
- $(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
-
-run$(EXEEXT): psim$(EXEEXT)
- $(SILENCE) rm -f $@
- $(ECHO_GEN) ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@
-
$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(ECHO_AR) $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(ECHO_RANLIB) $(RANLIB) $(TARGETLIB)
@@ -811,7 +799,7 @@ TAGS: $(BUILT_SRC)
etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
clean mostlyclean:
- rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG)
+ rm -f tmp-* *.[oasi] core igen dgen $(BUILT_SRC_WO_CONFIG)
distclean realclean: clean
rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
@@ -15,5 +15,20 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/main.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+%D%/psim$(EXEEXT): %D%/run$(EXEEXT)
+ $(AM_V_GEN)ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@
+
+## Helper targets for running make from the top-level due to run's sis.o.
+%D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
+noinst_PROGRAMS += %D%/run %D%/psim
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/BUGS %D%/INSTALL %D%/README %D%/RUN
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 1990-2022 Free Software Foundation, Inc.
+## Written by Dimitar Dimitrov <dimitar@dinux.eu>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,25 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2005-2022 Free Software Foundation, Inc.
+## Written by Mike Frysinger.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
new file mode 100644
@@ -0,0 +1,29 @@
+## See sim/Makefile.am
+##
+## Copyright (C) 2008-2022 Free Software Foundation, Inc.
+## Contributed by Red Hat, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/main.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
+## Helper targets for running make from the top-level due to run's main.o.
+%D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
@@ -1,6 +1,7 @@
## See sim/Makefile.am
##
## Copyright (C) 2008-2022 Free Software Foundation, Inc.
+## Contributed by Red Hat, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -15,5 +16,17 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/main.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
+## Helper targets for running make from the top-level due to run's main.o.
+%D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
+ $(MAKE) -C $(@D) $(@F)
+
%C%docdir = $(docdir)/%C%
%C%doc_DATA = %D%/README.txt
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILD_OUTPUTS = \
%D%/gencode$(EXEEXT) \
%D%/code.c \
@@ -16,6 +16,14 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+%C%_run_SOURCES =
+%C%_run_LDADD = \
+ %D%/nrun.o \
+ %D%/libsim.a \
+ $(SIM_COMMON_LIBS)
+
+noinst_PROGRAMS += %D%/run
+
%C%_BUILT_SRC_FROM_IGEN = \
%D%/icache.h \
%D%/icache.c \