2021-01-17 19:17:36 +08:00
|
|
|
## Process this file with automake to generate Makefile.in
|
2021-12-09 14:40:28 +08:00
|
|
|
##
|
2023-01-01 20:49:04 +08:00
|
|
|
# Copyright (C) 1993-2023 Free Software Foundation, Inc.
|
2021-01-17 19:17:36 +08:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
|
2021-01-18 00:13:37 +08:00
|
|
|
AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
|
2021-01-18 03:45:25 +08:00
|
|
|
ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
|
2021-01-17 19:17:36 +08:00
|
|
|
|
2022-10-31 20:46:44 +08:00
|
|
|
GNULIB_PARENT_DIR = ..
|
2023-01-03 08:30:22 +08:00
|
|
|
@am__include@ @am__quote@$(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc@am__quote@
|
2022-10-31 20:46:44 +08:00
|
|
|
|
2021-10-31 15:29:36 +08:00
|
|
|
srccom = $(srcdir)/common
|
2021-01-17 19:17:36 +08:00
|
|
|
srcroot = $(srcdir)/..
|
|
|
|
|
2023-01-02 04:05:18 +08:00
|
|
|
SUBDIRS = @subdirs@
|
2021-01-17 19:17:36 +08:00
|
|
|
|
2021-01-16 15:27:38 +08:00
|
|
|
SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
|
|
|
|
|
2021-12-09 14:40:28 +08:00
|
|
|
## We don't set some of these vars here, but we need to define them so they may
|
|
|
|
## be used consistently in local.mk files we include below.
|
2021-11-19 08:10:28 +08:00
|
|
|
pkginclude_HEADERS =
|
2021-03-14 09:54:49 +08:00
|
|
|
check_PROGRAMS =
|
2022-11-03 19:19:13 +08:00
|
|
|
noinst_PROGRAMS =
|
2023-01-15 10:55:31 +08:00
|
|
|
EXTRA_LIBRARIES =
|
2021-02-22 12:35:46 +08:00
|
|
|
noinst_LIBRARIES =
|
|
|
|
EXTRA_PROGRAMS =
|
2023-01-03 10:16:19 +08:00
|
|
|
BUILT_SOURCES =
|
2021-02-22 12:35:46 +08:00
|
|
|
|
2021-03-14 09:54:49 +08:00
|
|
|
CLEANFILES =
|
|
|
|
DISTCLEANFILES =
|
2021-01-17 19:17:36 +08:00
|
|
|
MOSTLYCLEANFILES = core
|
2022-12-27 12:20:46 +08:00
|
|
|
## We build some objects ourselves directly that Automake doesn't track, so
|
|
|
|
## make sure all objects in subdirs get cleaned up.
|
|
|
|
MOSTLYCLEANFILES += $(SIM_ENABLED_ARCHES:%=%/*.o)
|
2021-01-17 19:17:36 +08:00
|
|
|
|
2022-12-27 12:20:46 +08:00
|
|
|
AM_CFLAGS = \
|
|
|
|
$(WERROR_CFLAGS) \
|
|
|
|
$(WARN_CFLAGS) \
|
|
|
|
$(AM_CFLAGS_$(subst -,_,$(@D))) \
|
|
|
|
$(AM_CFLAGS_$(subst -,_,$(@D)_$(@F)))
|
2021-06-16 10:45:07 +08:00
|
|
|
AM_CPPFLAGS = \
|
2022-10-31 20:46:44 +08:00
|
|
|
$(INCGNU) \
|
2022-12-27 12:20:46 +08:00
|
|
|
-I$(srcroot) \
|
2021-06-16 10:45:07 +08:00
|
|
|
-I$(srcroot)/include \
|
2022-10-31 20:50:52 +08:00
|
|
|
-I../bfd \
|
|
|
|
-I.. \
|
2022-12-27 12:20:46 +08:00
|
|
|
-I$(@D) \
|
|
|
|
-I$(srcdir)/$(@D) \
|
2022-11-05 11:33:37 +08:00
|
|
|
$(SIM_HW_CFLAGS) \
|
2022-12-27 12:20:46 +08:00
|
|
|
$(SIM_INLINE) \
|
|
|
|
$(AM_CPPFLAGS_$(subst -,_,$(@D))) \
|
|
|
|
$(AM_CPPFLAGS_$(subst -,_,$(@D)_$(@F)))
|
2021-05-04 22:45:46 +08:00
|
|
|
|
2022-10-31 15:35:13 +08:00
|
|
|
AM_CPPFLAGS_FOR_BUILD = \
|
|
|
|
-I$(srcroot)/include \
|
2022-11-05 11:33:37 +08:00
|
|
|
$(SIM_HW_CFLAGS) \
|
2022-10-31 15:35:13 +08:00
|
|
|
$(SIM_INLINE)
|
|
|
|
COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
|
2021-01-18 03:45:25 +08:00
|
|
|
LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
|
|
|
|
|
2021-12-09 14:40:28 +08:00
|
|
|
## Deps to add to the all-recursive target. These are built before descending
|
|
|
|
## into any subdirs.
|
2021-05-14 16:39:39 +08:00
|
|
|
SIM_ALL_RECURSIVE_DEPS =
|
2022-11-05 15:35:00 +08:00
|
|
|
## Deps to add to the install-data-local target.
|
|
|
|
SIM_INSTALL_DATA_LOCAL_DEPS =
|
|
|
|
## Deps to add to the install-exec-local target.
|
|
|
|
SIM_INSTALL_EXEC_LOCAL_DEPS =
|
2022-11-05 15:44:15 +08:00
|
|
|
## Deps to add to the uninstall-local target.
|
|
|
|
SIM_UNINSTALL_LOCAL_DEPS =
|
2021-05-14 16:39:39 +08:00
|
|
|
|
2021-11-01 13:31:44 +08:00
|
|
|
# Generate target constants for newlib/libgloss from its source tree.
|
2021-01-17 19:17:36 +08:00
|
|
|
# This file is shipped with distributions so we build in the source dir.
|
|
|
|
# Use `make nltvals' to rebuild.
|
|
|
|
.PHONY: nltvals
|
|
|
|
nltvals:
|
2021-10-31 15:29:36 +08:00
|
|
|
$(srccom)/gennltvals.py --cpp "$(CPP)"
|
2021-01-18 00:13:37 +08:00
|
|
|
|
2021-11-19 08:10:28 +08:00
|
|
|
if ENABLE_SIM
|
|
|
|
pkginclude_HEADERS += \
|
2021-05-14 13:57:06 +08:00
|
|
|
$(srcroot)/include/sim/callback.h \
|
|
|
|
$(srcroot)/include/sim/sim.h
|
2021-11-19 08:10:28 +08:00
|
|
|
endif
|
2021-05-14 13:57:06 +08:00
|
|
|
|
2023-01-02 03:55:09 +08:00
|
|
|
## Used for our custom rules to calculate the dependency output base name.
|
|
|
|
## This form aligns with Automake's default rules.
|
|
|
|
SIM_DEPBASE = $(@D)/$(DEPDIR)/$(@F:.o=)
|
|
|
|
## Actual full compile command like Automake's default rules.
|
|
|
|
SIM_COMPILE = \
|
|
|
|
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(SIM_DEPBASE).Tpo -c -o $@ $< && \
|
|
|
|
$(am__mv) $(SIM_DEPBASE).Tpo $(SIM_DEPBASE).Po
|
|
|
|
|
2021-05-14 16:39:39 +08:00
|
|
|
include common/local.mk
|
2021-02-22 12:35:46 +08:00
|
|
|
include igen/local.mk
|
2021-01-18 00:13:37 +08:00
|
|
|
include testsuite/local.mk
|
2021-05-14 16:39:39 +08:00
|
|
|
|
2022-11-03 19:19:13 +08:00
|
|
|
## Arch includes must come after common/local.mk.
|
|
|
|
if SIM_ENABLE_ARCH_aarch64
|
|
|
|
include aarch64/local.mk
|
|
|
|
endif
|
2021-11-19 08:32:31 +08:00
|
|
|
if SIM_ENABLE_ARCH_arm
|
|
|
|
include arm/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_avr
|
|
|
|
include avr/local.mk
|
|
|
|
endif
|
|
|
|
if SIM_ENABLE_ARCH_bfin
|
|
|
|
include bfin/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_bpf
|
|
|
|
include bpf/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
if SIM_ENABLE_ARCH_cr16
|
|
|
|
include cr16/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_cris
|
|
|
|
include cris/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
if SIM_ENABLE_ARCH_d10v
|
|
|
|
include d10v/local.mk
|
|
|
|
endif
|
2021-11-19 08:32:31 +08:00
|
|
|
if SIM_ENABLE_ARCH_erc32
|
|
|
|
include erc32/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_examples
|
|
|
|
include example-synacor/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_frv
|
|
|
|
include frv/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_ft32
|
|
|
|
include ft32/local.mk
|
|
|
|
endif
|
|
|
|
if SIM_ENABLE_ARCH_h8300
|
|
|
|
include h8300/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_iq2000
|
|
|
|
include iq2000/local.mk
|
|
|
|
endif
|
|
|
|
if SIM_ENABLE_ARCH_lm32
|
|
|
|
include lm32/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
if SIM_ENABLE_ARCH_m32c
|
|
|
|
include m32c/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_m32r
|
|
|
|
include m32r/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
if SIM_ENABLE_ARCH_m68hc11
|
|
|
|
include m68hc11/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
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
|
2021-10-31 14:47:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_mn10300
|
|
|
|
include mn10300/local.mk
|
|
|
|
endif
|
2021-12-05 02:35:25 +08:00
|
|
|
if SIM_ENABLE_ARCH_moxie
|
|
|
|
include moxie/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_msp430
|
|
|
|
include msp430/local.mk
|
|
|
|
endif
|
2021-10-31 15:29:36 +08:00
|
|
|
if SIM_ENABLE_ARCH_or1k
|
|
|
|
include or1k/local.mk
|
|
|
|
endif
|
2021-11-19 08:32:31 +08:00
|
|
|
if SIM_ENABLE_ARCH_ppc
|
|
|
|
include ppc/local.mk
|
|
|
|
endif
|
2022-11-03 19:19:13 +08:00
|
|
|
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
|
2021-11-19 08:32:31 +08:00
|
|
|
if SIM_ENABLE_ARCH_rx
|
|
|
|
include rx/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
if SIM_ENABLE_ARCH_sh
|
|
|
|
include sh/local.mk
|
|
|
|
endif
|
2021-10-31 14:47:13 +08:00
|
|
|
if SIM_ENABLE_ARCH_v850
|
|
|
|
include v850/local.mk
|
|
|
|
endif
|
2021-10-31 14:08:38 +08:00
|
|
|
|
2022-11-03 19:19:13 +08:00
|
|
|
## Helper targets for running make from the top-level when some subdirs still
|
|
|
|
## have Makefiles in subdirs.
|
|
|
|
|
2021-05-14 16:39:39 +08:00
|
|
|
all-recursive: $(SIM_ALL_RECURSIVE_DEPS)
|
2022-11-05 15:35:00 +08:00
|
|
|
|
|
|
|
install-data-local: installdirs $(SIM_INSTALL_DATA_LOCAL_DEPS)
|
|
|
|
$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(libdir)
|
|
|
|
lib=`echo sim | sed '$(program_transform_name)'`; \
|
2022-11-07 22:30:10 +08:00
|
|
|
for d in $(SIM_ENABLED_ARCHES); do \
|
|
|
|
n="$$lib"; \
|
|
|
|
[ "$(SIM_PRIMARY_TARGET)" = "$$d" ] || n="$$n-$$d"; \
|
|
|
|
n="lib$$n.a"; \
|
|
|
|
$(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \
|
2022-11-05 15:35:00 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS)
|
|
|
|
$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
|
|
|
|
run=`echo run | sed '$(program_transform_name)'`; \
|
2022-11-07 22:30:10 +08:00
|
|
|
for d in $(SIM_ENABLED_ARCHES); do \
|
|
|
|
n="$$run"; \
|
|
|
|
[ "$(SIM_PRIMARY_TARGET)" = "$$d" ] || n="$$n-$$d"; \
|
|
|
|
$(LIBTOOL) --mode=install \
|
|
|
|
$(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) || exit 1; \
|
2022-11-05 15:35:00 +08:00
|
|
|
done
|
2022-11-05 15:44:15 +08:00
|
|
|
|
|
|
|
uninstall-local: $(SIM_UNINSTALL_LOCAL_DEPS)
|
|
|
|
rm -f $(DESTDIR)$(bindir)/run $(DESTDIR)$(libdir)/libsim.a
|
2022-11-07 22:30:10 +08:00
|
|
|
for d in $(SIM_ENABLED_ARCHES); do \
|
2022-11-05 15:44:15 +08:00
|
|
|
rm -f $(DESTDIR)$(bindir)/run-$$d $(DESTDIR)$(libdir)/libsim-$$d.a; \
|
|
|
|
done
|