Automatic date update in version.in
[binutils-gdb.git] / sim / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2 ##
3 # Copyright (C) 1993-2022 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 AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
19 ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
20
21 srccom = $(srcdir)/common
22 srcroot = $(srcdir)/..
23
24 SUBDIRS = @subdirs@ $(SIM_SUBDIRS)
25
26 SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
27 AM_MAKEFLAGS = SIM_PRIMARY_TARGET=$(SIM_PRIMARY_TARGET)
28
29 ## We don't set some of these vars here, but we need to define them so they may
30 ## be used consistently in local.mk files we include below.
31 pkginclude_HEADERS =
32 check_PROGRAMS =
33 noinst_LIBRARIES =
34 EXTRA_PROGRAMS =
35
36 CLEANFILES =
37 DISTCLEANFILES =
38 MOSTLYCLEANFILES = core
39
40 AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
41 AM_CPPFLAGS = \
42 -I$(srcroot)/include \
43 $(SIM_INLINE)
44
45 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS) $(CFLAGS_FOR_BUILD)
46 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
47
48 ## Deps to add to the all-recursive target. These are built before descending
49 ## into any subdirs.
50 SIM_ALL_RECURSIVE_DEPS =
51
52 # Generate target constants for newlib/libgloss from its source tree.
53 # This file is shipped with distributions so we build in the source dir.
54 # Use `make nltvals' to rebuild.
55 .PHONY: nltvals
56 nltvals:
57 $(srccom)/gennltvals.py --cpp "$(CPP)"
58
59 if ENABLE_SIM
60 pkginclude_HEADERS += \
61 $(srcroot)/include/sim/callback.h \
62 $(srcroot)/include/sim/sim.h
63 endif
64
65 include common/local.mk
66 if SIM_ENABLE_IGEN
67 include igen/local.mk
68 endif
69 include testsuite/local.mk
70
71 if SIM_ENABLE_ARCH_arm
72 include arm/local.mk
73 endif
74 if SIM_ENABLE_ARCH_bpf
75 include bpf/local.mk
76 endif
77 if SIM_ENABLE_ARCH_cr16
78 include cr16/local.mk
79 endif
80 if SIM_ENABLE_ARCH_cris
81 include cris/local.mk
82 endif
83 if SIM_ENABLE_ARCH_d10v
84 include d10v/local.mk
85 endif
86 if SIM_ENABLE_ARCH_erc32
87 include erc32/local.mk
88 endif
89 if SIM_ENABLE_ARCH_frv
90 include frv/local.mk
91 endif
92 if SIM_ENABLE_ARCH_iq2000
93 include iq2000/local.mk
94 endif
95 if SIM_ENABLE_ARCH_lm32
96 include lm32/local.mk
97 endif
98 if SIM_ENABLE_ARCH_m32c
99 include m32c/local.mk
100 endif
101 if SIM_ENABLE_ARCH_m32r
102 include m32r/local.mk
103 endif
104 if SIM_ENABLE_ARCH_m68hc11
105 include m68hc11/local.mk
106 endif
107 if SIM_ENABLE_ARCH_mn10300
108 include mn10300/local.mk
109 endif
110 if SIM_ENABLE_ARCH_moxie
111 include moxie/local.mk
112 endif
113 if SIM_ENABLE_ARCH_or1k
114 include or1k/local.mk
115 endif
116 if SIM_ENABLE_ARCH_ppc
117 include ppc/local.mk
118 endif
119 if SIM_ENABLE_ARCH_rx
120 include rx/local.mk
121 endif
122 if SIM_ENABLE_ARCH_sh
123 include sh/local.mk
124 endif
125 if SIM_ENABLE_ARCH_v850
126 include v850/local.mk
127 endif
128
129 all-recursive: $(SIM_ALL_RECURSIVE_DEPS)