]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/common/local.mk
sim: overhaul & unify endian settings management
[thirdparty/binutils-gdb.git] / sim / common / local.mk
1 ## See sim/Makefile.am.
2 #
3 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 # Parts of the common/ sim code that have been unified.
19 # Most still lives in common/Make-common.in.
20
21 AM_CPPFLAGS += -I$(srcdir)/%D%
22
23 # This makes sure common parts are available before building the arch-subdirs
24 # which will refer to these.
25 SIM_ALL_RECURSIVE_DEPS += \
26 %D%/libcommon.a
27
28 # NB: libcommon.a isn't used directly by ports. We need a target for common
29 # objects to be a part of, and ports use the individual objects directly.
30 noinst_LIBRARIES += %D%/libcommon.a
31 %C%_libcommon_a_CPPFLAGS = \
32 $(AM_CPPFLAGS) \
33 -DSIM_COMMON_BUILD \
34 -I../bfd \
35 -I..
36 %C%_libcommon_a_SOURCES = \
37 %D%/portability.c \
38 %D%/sim-load.c \
39 %D%/version.c
40
41 %D%/version.c: %D%/version.c-stamp ; @true
42 %D%/version.c-stamp: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh
43 $(AM_V_GEN)$(SHELL) $(srcdir)/%D%/create-version.sh $(srcroot)/gdb $@.tmp
44 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=)
45 $(AM_V_at)touch $@
46
47 CLEANFILES += \
48 %D%/version.c %D%/version.c-stamp