xref: /netbsd-src/external/gpl3/gdb/dist/sim/moxie/local.mk (revision 4b004442778f1201b2161e87fd65ba87aae6601a)
1## See sim/Makefile.am
2##
3## Copyright (C) 2008-2023 Free Software Foundation, Inc.
4## Written by Anthony Green
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 3 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19%C%_run_SOURCES =
20%C%_run_LDADD = \
21	%D%/nrun.o \
22	%D%/libsim.a \
23	$(SIM_COMMON_LIBS)
24
25noinst_PROGRAMS += %D%/run
26
27dtbdir = $(datadir)/gdb/dtb
28
29dtb_DATA = %D%/moxie-gdb.dtb
30
31%D%/moxie-gdb.dtb: @MAINT@ %D%/moxie-gdb.dts %D%/$(am__dirstamp)
32	$(AM_V_GEN) \
33	if test "x$(DTC)" != x; then \
34	  $(DTC) -O dtb -o $@.tmp ${srcdir}/%D%/moxie-gdb.dts || exit 1; \
35	  $(SHELL) $(srcroot)/move-if-change $@.tmp ${srcdir}/%D%/moxie-gdb.dtb || exit 1; \
36	  touch ${srcdir}/%D%/moxie-gdb.dtb; \
37	else \
38	  echo "Could not update the moxie-gdb.dtb file because the device "; \
39	  echo "tree compiler tool (dtc) is missing.  Install the tool to "; \
40	  echo "update the device tree blob."; \
41	fi
42