]>
Commit | Line | Data |
---|---|---|
6bddc3e8 | 1 | ## Process this file with automake to generate Makefile.in |
de8a2781 | 2 | ## |
1d506c26 | 3 | # Copyright (C) 1993-2024 Free Software Foundation, Inc. |
6bddc3e8 MF |
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 | ||
6c57b87f | 18 | AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects |
c2783492 | 19 | ACLOCAL_AMFLAGS = -Im4 -I.. -I../config |
6bddc3e8 | 20 | |
46a1e1f2 | 21 | GNULIB_PARENT_DIR = .. |
4d4996a5 | 22 | @am__include@ @am__quote@$(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc@am__quote@ |
46a1e1f2 | 23 | |
0a129eb1 | 24 | srccom = $(srcdir)/common |
6bddc3e8 MF |
25 | srcroot = $(srcdir)/.. |
26 | ||
a0e674c1 | 27 | SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@ |
a0e674c1 | 28 | |
de8a2781 MF |
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. | |
fb2c495f | 31 | pkginclude_HEADERS = |
a389375f | 32 | check_PROGRAMS = |
c0c25232 | 33 | noinst_PROGRAMS = |
9a7472d7 | 34 | EXTRA_LIBRARIES = |
b6b1c790 MF |
35 | noinst_LIBRARIES = |
36 | EXTRA_PROGRAMS = | |
80636a54 | 37 | BUILT_SOURCES = |
b6b1c790 | 38 | |
a389375f MF |
39 | CLEANFILES = |
40 | DISTCLEANFILES = | |
6bddc3e8 | 41 | MOSTLYCLEANFILES = core |
bc438b3e MF |
42 | ## We build some objects ourselves directly that Automake doesn't track, so |
43 | ## make sure all objects in subdirs get cleaned up. | |
44 | MOSTLYCLEANFILES += $(SIM_ENABLED_ARCHES:%=%/*.o) | |
6bddc3e8 | 45 | |
ab18008e MF |
46 | CONFIG_STATUS_DEPENDENCIES = $(srcroot)/bfd/development.sh |
47 | ||
bc438b3e MF |
48 | AM_CFLAGS = \ |
49 | $(WERROR_CFLAGS) \ | |
50 | $(WARN_CFLAGS) \ | |
51 | $(AM_CFLAGS_$(subst -,_,$(@D))) \ | |
52 | $(AM_CFLAGS_$(subst -,_,$(@D)_$(@F))) | |
d73f39ee | 53 | AM_CPPFLAGS = \ |
46a1e1f2 | 54 | $(INCGNU) \ |
bc438b3e | 55 | -I$(srcroot) \ |
d73f39ee | 56 | -I$(srcroot)/include \ |
a1af8f40 MF |
57 | -I../bfd \ |
58 | -I.. \ | |
bc438b3e MF |
59 | -I$(@D) \ |
60 | -I$(srcdir)/$(@D) \ | |
bfc96c10 | 61 | $(SIM_HW_CFLAGS) \ |
bc438b3e MF |
62 | $(SIM_INLINE) \ |
63 | $(AM_CPPFLAGS_$(subst -,_,$(@D))) \ | |
64 | $(AM_CPPFLAGS_$(subst -,_,$(@D)_$(@F))) | |
a0c4531a | 65 | |
fde7c6bf MF |
66 | AM_CPPFLAGS_FOR_BUILD = \ |
67 | -I$(srcroot)/include \ | |
bfc96c10 | 68 | $(SIM_HW_CFLAGS) \ |
fde7c6bf | 69 | $(SIM_INLINE) |
435ad222 | 70 | COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(BUILD_WERROR_CFLAGS) $(BUILD_WARN_CFLAGS) |
c2783492 MF |
71 | LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ |
72 | ||
63bf33ff MF |
73 | ## Deps to add to the install-data-local target. |
74 | SIM_INSTALL_DATA_LOCAL_DEPS = | |
75 | ## Deps to add to the install-exec-local target. | |
76 | SIM_INSTALL_EXEC_LOCAL_DEPS = | |
59d8576e MF |
77 | ## Deps to add to the uninstall-local target. |
78 | SIM_UNINSTALL_LOCAL_DEPS = | |
5bea0c32 | 79 | |
64ae70dd | 80 | # Generate target constants for newlib/libgloss from its source tree. |
6bddc3e8 MF |
81 | # This file is shipped with distributions so we build in the source dir. |
82 | # Use `make nltvals' to rebuild. | |
6bddc3e8 MF |
83 | .PHONY: nltvals |
84 | nltvals: | |
0a129eb1 | 85 | $(srccom)/gennltvals.py --cpp "$(CPP)" |
6c57b87f | 86 | |
fb2c495f MF |
87 | if ENABLE_SIM |
88 | pkginclude_HEADERS += \ | |
92bc001e MF |
89 | $(srcroot)/include/sim/callback.h \ |
90 | $(srcroot)/include/sim/sim.h | |
fb2c495f | 91 | endif |
92bc001e | 92 | |
b36a89d1 MF |
93 | ## Used for our custom rules to calculate the dependency output base name. |
94 | ## This form aligns with Automake's default rules. | |
95 | SIM_DEPBASE = $(@D)/$(DEPDIR)/$(@F:.o=) | |
96 | ## Actual full compile command like Automake's default rules. | |
97 | SIM_COMPILE = \ | |
98 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(SIM_DEPBASE).Tpo -c -o $@ $< && \ | |
99 | $(am__mv) $(SIM_DEPBASE).Tpo $(SIM_DEPBASE).Po | |
100 | ||
5bea0c32 | 101 | include common/local.mk |
b6b1c790 | 102 | include igen/local.mk |
6c57b87f | 103 | include testsuite/local.mk |
5bea0c32 | 104 | |
c0c25232 MF |
105 | ## Arch includes must come after common/local.mk. |
106 | if SIM_ENABLE_ARCH_aarch64 | |
107 | include aarch64/local.mk | |
108 | endif | |
ed939535 MF |
109 | if SIM_ENABLE_ARCH_arm |
110 | include arm/local.mk | |
111 | endif | |
c0c25232 MF |
112 | if SIM_ENABLE_ARCH_avr |
113 | include avr/local.mk | |
114 | endif | |
115 | if SIM_ENABLE_ARCH_bfin | |
116 | include bfin/local.mk | |
117 | endif | |
0a129eb1 MF |
118 | if SIM_ENABLE_ARCH_bpf |
119 | include bpf/local.mk | |
120 | endif | |
70ab6bdd MF |
121 | if SIM_ENABLE_ARCH_cr16 |
122 | include cr16/local.mk | |
123 | endif | |
0a129eb1 MF |
124 | if SIM_ENABLE_ARCH_cris |
125 | include cris/local.mk | |
126 | endif | |
70ab6bdd MF |
127 | if SIM_ENABLE_ARCH_d10v |
128 | include d10v/local.mk | |
129 | endif | |
ed939535 MF |
130 | if SIM_ENABLE_ARCH_erc32 |
131 | include erc32/local.mk | |
132 | endif | |
c0c25232 MF |
133 | if SIM_ENABLE_ARCH_examples |
134 | include example-synacor/local.mk | |
135 | endif | |
0a129eb1 MF |
136 | if SIM_ENABLE_ARCH_frv |
137 | include frv/local.mk | |
138 | endif | |
c0c25232 MF |
139 | if SIM_ENABLE_ARCH_ft32 |
140 | include ft32/local.mk | |
141 | endif | |
142 | if SIM_ENABLE_ARCH_h8300 | |
143 | include h8300/local.mk | |
144 | endif | |
0a129eb1 MF |
145 | if SIM_ENABLE_ARCH_iq2000 |
146 | include iq2000/local.mk | |
147 | endif | |
148 | if SIM_ENABLE_ARCH_lm32 | |
149 | include lm32/local.mk | |
150 | endif | |
70ab6bdd MF |
151 | if SIM_ENABLE_ARCH_m32c |
152 | include m32c/local.mk | |
153 | endif | |
0a129eb1 MF |
154 | if SIM_ENABLE_ARCH_m32r |
155 | include m32r/local.mk | |
156 | endif | |
70ab6bdd MF |
157 | if SIM_ENABLE_ARCH_m68hc11 |
158 | include m68hc11/local.mk | |
159 | endif | |
c0c25232 MF |
160 | if SIM_ENABLE_ARCH_mcore |
161 | include mcore/local.mk | |
162 | endif | |
163 | if SIM_ENABLE_ARCH_microblaze | |
164 | include microblaze/local.mk | |
165 | endif | |
166 | if SIM_ENABLE_ARCH_mips | |
167 | include mips/local.mk | |
168 | endif | |
d2a5dbc7 MF |
169 | if SIM_ENABLE_ARCH_mn10300 |
170 | include mn10300/local.mk | |
171 | endif | |
94f5dfed MF |
172 | if SIM_ENABLE_ARCH_moxie |
173 | include moxie/local.mk | |
174 | endif | |
c0c25232 MF |
175 | if SIM_ENABLE_ARCH_msp430 |
176 | include msp430/local.mk | |
177 | endif | |
0a129eb1 MF |
178 | if SIM_ENABLE_ARCH_or1k |
179 | include or1k/local.mk | |
180 | endif | |
ed939535 MF |
181 | if SIM_ENABLE_ARCH_ppc |
182 | include ppc/local.mk | |
183 | endif | |
c0c25232 MF |
184 | if SIM_ENABLE_ARCH_pru |
185 | include pru/local.mk | |
186 | endif | |
187 | if SIM_ENABLE_ARCH_riscv | |
188 | include riscv/local.mk | |
189 | endif | |
190 | if SIM_ENABLE_ARCH_rl78 | |
191 | include rl78/local.mk | |
192 | endif | |
ed939535 MF |
193 | if SIM_ENABLE_ARCH_rx |
194 | include rx/local.mk | |
195 | endif | |
70ab6bdd MF |
196 | if SIM_ENABLE_ARCH_sh |
197 | include sh/local.mk | |
198 | endif | |
d2a5dbc7 MF |
199 | if SIM_ENABLE_ARCH_v850 |
200 | include v850/local.mk | |
201 | endif | |
70ab6bdd | 202 | |
63bf33ff MF |
203 | install-data-local: installdirs $(SIM_INSTALL_DATA_LOCAL_DEPS) |
204 | $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(libdir) | |
205 | lib=`echo sim | sed '$(program_transform_name)'`; \ | |
2ba09f42 MF |
206 | for d in $(SIM_ENABLED_ARCHES); do \ |
207 | n="$$lib"; \ | |
208 | [ "$(SIM_PRIMARY_TARGET)" = "$$d" ] || n="$$n-$$d"; \ | |
209 | n="lib$$n.a"; \ | |
210 | $(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \ | |
63bf33ff MF |
211 | done |
212 | ||
213 | install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS) | |
214 | $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) | |
215 | run=`echo run | sed '$(program_transform_name)'`; \ | |
2ba09f42 MF |
216 | for d in $(SIM_ENABLED_ARCHES); do \ |
217 | n="$$run"; \ | |
218 | [ "$(SIM_PRIMARY_TARGET)" = "$$d" ] || n="$$n-$$d"; \ | |
219 | $(LIBTOOL) --mode=install \ | |
220 | $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) || exit 1; \ | |
63bf33ff | 221 | done |
59d8576e MF |
222 | |
223 | uninstall-local: $(SIM_UNINSTALL_LOCAL_DEPS) | |
224 | rm -f $(DESTDIR)$(bindir)/run $(DESTDIR)$(libdir)/libsim.a | |
2ba09f42 | 225 | for d in $(SIM_ENABLED_ARCHES); do \ |
59d8576e MF |
226 | rm -f $(DESTDIR)$(bindir)/run-$$d $(DESTDIR)$(libdir)/libsim-$$d.a; \ |
227 | done |