GNU-ld: ARM: Issues when trying to set target output architecture
[binutils-gdb.git] / sim / m32r / local.mk
blobdb54567532108ad112f4e2504a49b9c0b82ded40
1 ## See sim/Makefile.am
2 ##
3 ## Copyright (C) 1996-2023 Free Software Foundation, Inc.
4 ## Contributed by Cygnus Support.
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.
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.
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/>.
19 ## Some modules don't build cleanly yet.
20 AM_CFLAGS_%C%_cpu.o = -Wno-error
21 AM_CFLAGS_%C%_cpu2.o = -Wno-error
22 AM_CFLAGS_%C%_cpux.o = -Wno-error
23 AM_CFLAGS_%C%_m32r.o = -Wno-error
24 AM_CFLAGS_%C%_m32r2.o = -Wno-error
25 AM_CFLAGS_%C%_m32rx.o = -Wno-error
26 AM_CFLAGS_%C%_mloop.o = -Wno-error
27 AM_CFLAGS_%C%_mloop2.o = -Wno-error
28 AM_CFLAGS_%C%_mloopx.o = -Wno-error
29 AM_CFLAGS_%C%_sem.o = -Wno-error
30 AM_CFLAGS_%C%_sim_if.o = -Wno-error
31 AM_CFLAGS_%C%_traps.o = -Wno-error
33 nodist_%C%_libsim_a_SOURCES = \
34 %D%/modules.c
35 %C%_libsim_a_SOURCES = \
36 $(common_libcommon_a_SOURCES)
37 %C%_libsim_a_LIBADD = \
38 $(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
39 $(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
40 $(patsubst %,%D%/dv-%.o,$(%C%_SIM_EXTRA_HW_DEVICES)) \
42 %D%/cgen-run.o \
43 %D%/cgen-scache.o \
44 %D%/cgen-trace.o \
45 %D%/cgen-utils.o \
47 %D%/arch.o \
49 %D%/m32r.o \
50 %D%/cpu.o \
51 %D%/decode.o \
52 %D%/sem.o \
53 %D%/model.o \
54 %D%/mloop.o \
56 %D%/m32rx.o \
57 %D%/cpux.o \
58 %D%/decodex.o \
59 %D%/modelx.o \
60 %D%/mloopx.o \
62 %D%/m32r2.o \
63 %D%/cpu2.o \
64 %D%/decode2.o \
65 %D%/model2.o \
66 %D%/mloop2.o \
68 %D%/sim-if.o \
69 %D%/traps.o
70 $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
72 noinst_LIBRARIES += %D%/libsim.a
74 ## Override wildcards that trigger common/modules.c to be (incorrectly) used.
75 %D%/modules.o: %D%/modules.c
77 %D%/%.o: common/%.c ; $(SIM_COMPILE)
78 -@am__include@ %D%/$(DEPDIR)/*.Po
80 %C%_run_SOURCES =
81 %C%_run_LDADD = \
82 %D%/nrun.o \
83 %D%/libsim.a \
84 $(SIM_COMMON_LIBS)
86 noinst_PROGRAMS += %D%/run
88 %C%_SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
90 ## List all generated headers to help Automake dependency tracking.
91 BUILT_SOURCES += \
92 %D%/eng.h \
93 %D%/engx.h \
94 %D%/eng2.h
95 %C%_BUILD_OUTPUTS = \
96 %D%/mloop.c \
97 %D%/stamp-mloop \
98 %D%/mloopx.c \
99 %D%/stamp-mloop-x \
100 %D%/mloop2.c \
101 %D%/stamp-mloop-2
103 ## Generating modules.c requires all sources to scan.
104 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
106 ## FIXME: Use of `mono' is wip.
107 %D%/mloop.c %D%/eng.h: %D%/stamp-mloop ; @true
108 %D%/stamp-mloop: $(srccom)/genmloop.sh %D%/mloop.in
109 $(AM_V_GEN)$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
110 -mono -fast -pbb -switch sem-switch.c \
111 -cpu m32rbf \
112 -infile $(srcdir)/%D%/mloop.in -outfile-prefix %D%/
113 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng.hin %D%/eng.h
114 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop.cin %D%/mloop.c
115 $(AM_V_at)touch $@
117 ## FIXME: Use of `mono' is wip.
118 %D%/mloopx.c %D%/engx.h: %D%/stamp-mloop-x ; @true
119 %D%/stamp-mloop-x: $(srccom)/genmloop.sh %D%/mloop.in
120 $(AM_V_GEN)$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
121 -mono -no-fast -pbb -parallel-write -switch semx-switch.c \
122 -cpu m32rxf \
123 -infile $(srcdir)/%D%/mloopx.in -outfile-prefix %D%/ -outfile-suffix x
124 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/engx.hin %D%/engx.h
125 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloopx.cin %D%/mloopx.c
126 $(AM_V_at)touch $@
128 ## FIXME: Use of `mono' is wip.
129 %D%/mloop2.c %D%/eng2.h: %D%/stamp-mloop-2 ; @true
130 %D%/stamp-mloop-2: $(srccom)/genmloop.sh %D%/mloop.in
131 $(AM_V_GEN)$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
132 -mono -no-fast -pbb -parallel-write -switch sem2-switch.c \
133 -cpu m32r2f \
134 -infile $(srcdir)/%D%/mloop2.in -outfile-prefix %D%/ -outfile-suffix 2
135 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng2.hin %D%/eng2.h
136 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop2.cin %D%/mloop2.c
137 $(AM_V_at)touch $@
139 MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS)
141 ## Target that triggers all cgen targets that works when --disable-cgen-maint.
142 %D%/cgen: %D%/cgen-arch %D%/cgen-cpu-decode %D%/cgen-cpu-decode-x %D%/cgen-cpu-decode-2
144 %D%/cgen-arch:
145 $(AM_V_GEN)mach=all FLAGS="with-scache with-profile=fn"; $(CGEN_GEN_ARCH)
146 $(srcdir)/%D%/arch.h $(srcdir)/%D%/arch.c $(srcdir)/%D%/cpuall.h: @CGEN_MAINT@ %D%/cgen-arch
148 %D%/cgen-cpu-decode:
149 $(AM_V_GEN)cpu=m32rbf mach=m32r FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
150 $(srcdir)/%D%/cpu.h $(srcdir)/%D%/sem.c $(srcdir)/%D%/sem-switch.c $(srcdir)/%D%/model.c $(srcdir)/%D%/decode.c $(srcdir)/%D%/decode.h: @CGEN_MAINT@ %D%/cgen-cpu-decode
152 %D%/cgen-cpu-decode-x:
153 $(AM_V_GEN)cpu=m32rxf mach=m32rx SUFFIX=x FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
154 $(srcdir)/%D%/cpux.h $(srcdir)/%D%/semx-switch.c $(srcdir)/%D%/modelx.c $(srcdir)/%D%/decodex.c $(srcdir)/%D%/decodex.h: @CGEN_MAINT@ %D%/cgen-cpu-decode-x
156 %D%/cgen-cpu-decode-2:
157 $(AM_V_GEN)cpu=m32r2f mach=m32r2 SUFFIX=2 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
158 $(srcdir)/%D%/cpu2.h $(srcdir)/%D%/sem2-switch.c $(srcdir)/%D%/model2.c $(srcdir)/%D%/decode2.c $(srcdir)/%D%/decode2.h: @CGEN_MAINT@ %D%/cgen-cpu-decode-2