3 ## Copyright (C) 1996-2023 Free Software Foundation, Inc.
4 ## Contributed by Cygnus Support.
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
= \
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
)) \
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
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.
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 \
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
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 \
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
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 \
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
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
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
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