aboutsummaryrefslogtreecommitdiff
path: root/sim/common/local.mk
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-14 04:39:39 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-05 10:09:27 -0400
commit5bea0c32765c297541290a5e2bef6b24a86a069d (patch)
tree16ab7b95a9b8d4d3f541c6b19dee2f762c567bc5 /sim/common/local.mk
parentad4bd975fc27a996b16b4d94706d1bf70574590c (diff)
downloadbinutils-5bea0c32765c297541290a5e2bef6b24a86a069d.zip
binutils-5bea0c32765c297541290a5e2bef6b24a86a069d.tar.gz
binutils-5bea0c32765c297541290a5e2bef6b24a86a069d.tar.bz2
sim: common: start dedicated local.mk
This provides a space to generate things that we only need to build once per-arch. Some day that will be all of common/, but for now, we move the version.c management in.
Diffstat (limited to 'sim/common/local.mk')
-rw-r--r--sim/common/local.mk37
1 files changed, 37 insertions, 0 deletions
diff --git a/sim/common/local.mk b/sim/common/local.mk
new file mode 100644
index 0000000..357be75
--- /dev/null
+++ b/sim/common/local.mk
@@ -0,0 +1,37 @@
+## See sim/Makefile.am.
+#
+# Copyright (C) 1997-2021 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/>.
+
+# Parts of the common/ sim code that have been unified.
+# Most still lives in common/Make-common.in.
+
+AM_CPPFLAGS += -I$(srcdir)/%D%
+
+# This makes sure common parts are available before building the arch-subdirs
+# which will refer to these.
+SIM_ALL_RECURSIVE_DEPS += \
+ %D%/libcommon.a
+
+# 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
+%C%_libcommon_a_SOURCES = \
+ %D%/version.c
+
+%D%/version.c: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh
+ $(SHELL) $(srcdir)/%D%/create-version.sh $(srcroot)/gdb $@.tmp
+ $(SHELL) $(srcroot)/move-if-change $@.tmp $@
+ touch $@