aboutsummaryrefslogtreecommitdiff
path: root/sim/moxie
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-12-04 13:35:25 -0500
committerMike Frysinger <vapier@gentoo.org>2021-12-04 13:55:13 -0500
commit94f5dfed74985a1a8ff4b8bf1a383f46621e5f8c (patch)
tree866b2f65e89744e2568a2a15c03abaf856652123 /sim/moxie
parent520e19d589b558e569f4945f34f9ac67f550a542 (diff)
downloadgdb-94f5dfed74985a1a8ff4b8bf1a383f46621e5f8c.zip
gdb-94f5dfed74985a1a8ff4b8bf1a383f46621e5f8c.tar.gz
gdb-94f5dfed74985a1a8ff4b8bf1a383f46621e5f8c.tar.bz2
sim: moxie: hoist dtb rules up to common builds
These rules don't depend on the target compiler settings, so hoist the build logic up to the common builds for better parallelization.
Diffstat (limited to 'sim/moxie')
-rw-r--r--sim/moxie/Makefile.in20
-rw-r--r--sim/moxie/local.mk32
2 files changed, 32 insertions, 20 deletions
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index 6671389..0e8b20a 100644
--- a/sim/moxie/Makefile.in
+++ b/sim/moxie/Makefile.in
@@ -17,32 +17,12 @@
## COMMON_PRE_CONFIG_FRAG
-dtbdir = $(datadir)/gdb/dtb
-
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
interp.o \
sim-resume.o
SIM_EXTRA_LIBS = -lm -lz
-SIM_EXTRA_INSTALL = install-dtb
SIM_EXTRA_CFLAGS = -DDTB="\"$(dtbdir)/moxie-gdb.dtb\""
## COMMON_POST_CONFIG_FRAG
-
-all: moxie-gdb.dtb
-
-moxie-gdb.dtb: $(MAINT) moxie-gdb.dts
- @echo Regenerating moxie-gdb.dtb
- if test "x$(DTC)" != x; then \
- $(DTC) -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts || exit 1; \
- $(SHELL) $(srcroot)/move-if-change moxie-gdb.dtb ${srcdir}/moxie-gdb.dtb || exit 1; \
- else \
- echo "Could not update the moxie-gdb.dtb file because the device "; \
- echo "tree compiler tool (dtc) is missing. Install the tool to "; \
- echo "update the device tree blob."; \
- fi
-
-install-dtb: moxie-gdb.dtb
- $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(dtbdir)
- $(INSTALL_DATA) $(srcdir)/moxie-gdb.dtb $(DESTDIR)$(dtbdir)/moxie-gdb.dtb
diff --git a/sim/moxie/local.mk b/sim/moxie/local.mk
new file mode 100644
index 0000000..b73bd85
--- /dev/null
+++ b/sim/moxie/local.mk
@@ -0,0 +1,32 @@
+# See sim/Makefile.am
+#
+# Copyright (C) 1993-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/>.
+
+dtbdir = $(datadir)/gdb/dtb
+
+dtb_DATA = %D%/moxie-gdb.dtb
+
+%D%/moxie-gdb.dtb: @MAINT@ %D%/moxie-gdb.dts %D%/$(am__dirstamp)
+ $(AM_V_GEN) \
+ if test "x$(DTC)" != x; then \
+ $(DTC) -O dtb -o $@.tmp ${srcdir}/%D%/moxie-gdb.dts || exit 1; \
+ $(SHELL) $(srcroot)/move-if-change $@.tmp ${srcdir}/%D%/moxie-gdb.dtb || exit 1; \
+ touch ${srcdir}/%D%/moxie-gdb.dtb; \
+ else \
+ echo "Could not update the moxie-gdb.dtb file because the device "; \
+ echo "tree compiler tool (dtc) is missing. Install the tool to "; \
+ echo "update the device tree blob."; \
+ fi