3 ## Copyright (C) 2004-2024 Free Software Foundation, Inc.
4 ## Contributed by Axis Communications.
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 CGEN kludges are causing build-time warnings. See cris.cpu for details.
20 AM_CFLAGS_
%C
%_mloopv10f.o
= $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE
)
21 AM_CFLAGS_
%C
%_mloopv32f.o
= $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE
)
22 ## Some CGEN assignments use variable names that are nested & repeated.
23 AM_CFLAGS_
%C
%_mloopv10f.o
+= $(SIM_CFLAG_WNO_SHADOW_LOCAL
)
25 nodist_
%C
%_libsim_a_SOURCES
= \
27 %C
%_libsim_a_SOURCES
= \
28 $(common_libcommon_a_SOURCES
)
29 %C
%_libsim_a_LIBADD
= \
30 $(patsubst %,%D
%/%,$(SIM_NEW_COMMON_OBJS
)) \
31 $(patsubst %,%D
%/dv-
%.o
,$(SIM_HW_DEVICES
)) \
32 $(patsubst %,%D
%/dv-
%.o
,$(%C
%_SIM_EXTRA_HW_DEVICES
)) \
53 $(%C
%_libsim_a_OBJECTS
) $(%C
%_libsim_a_LIBADD
): %D
%/hw-config.h
55 noinst_LIBRARIES
+= %D
%/libsim.a
57 ## Override wildcards that trigger common/modules.c to be (incorrectly) used.
58 %D
%/modules.o
: %D
%/modules.c
60 %D
%/%.o
: common
/%.c
; $(SIM_COMPILE
)
61 -@am__include@
%D
%/$(DEPDIR
)/*.Po
69 noinst_PROGRAMS
+= %D
%/run
71 %C
%_SIM_EXTRA_HW_DEVICES
= rv cris cris_900000xx
73 ## rvdummy is just used for testing -- it runs on the same host as `run`.
74 ## It does nothing if --enable-sim-hardware isn't active.
75 %C
%_rvdummy_SOURCES
= %D
%/rvdummy.c
76 %C
%_rvdummy_LDADD
= $(LIBIBERTY_LIB
)
78 check_PROGRAMS
+= %D
%/rvdummy
80 ## List all generated headers to help Automake dependency tracking.
86 %D
%/stamp-mloop-v10f \
90 ## Generating modules.c requires all sources to scan.
91 %D
%/modules.c
: |
$(%C
%_BUILD_OUTPUTS
)
93 ## FIXME: What is mono and what does "Use of `mono' is wip" mean (other
94 ## than the apparent; some "mono" feature is work in progress)?
95 %D
%/mloopv10f.c
%D
%/engv10.h
: %D
%/stamp-mloop-v10f
; @true
96 %D
%/stamp-mloop-v10f
: %D
%/mloop.in
$(srccom
)/genmloop.sh
97 $(AM_V_GEN
)$(CGEN_GEN_MLOOP
) \
98 -mono
-no-fast
-pbb
-switch semcrisv10f-switch.c \
99 -cpu crisv10f
-outfile-suffix
-v10f
100 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
%D
%/eng-v10f.hin
%D
%/engv10.h
101 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
%D
%/mloop-v10f.cin
%D
%/mloopv10f.c
104 ## FIXME: What is mono and what does "Use of `mono' is wip" mean (other
105 ## than the apparent; some "mono" feature is work in progress)?
106 %D
%/mloopv32f.c
%D
%/engv32.h
: %D
%/stamp-mloop-v32f
; @true
107 %D
%/stamp-mloop-v32f
: %D
%/mloop.in
$(srccom
)/genmloop.sh
108 $(AM_V_GEN
)$(CGEN_GEN_MLOOP
) \
109 -mono
-no-fast
-pbb
-switch semcrisv32f-switch.c \
110 -cpu crisv32f
-outfile-suffix
-v32f
111 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
%D
%/eng-v32f.hin
%D
%/engv32.h
112 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
%D
%/mloop-v32f.cin
%D
%/mloopv32f.c
115 CLEANFILES
+= %D
%/engv10.h
%D
%/engv32.h
116 MOSTLYCLEANFILES
+= $(%C
%_BUILD_OUTPUTS
)
118 ## Target that triggers all cgen targets that works when --disable-cgen-maint.
119 %D
%/cgen
: %D
%/cgen-arch
%D
%/cgen-cpu-decode-v10f
%D
%/cgen-cpu-decode-v32f
122 $(AM_V_GEN
)mach
=crisv10
,crisv32 FLAGS
="with-scache with-profile=fn"; $(CGEN_GEN_ARCH
)
123 $(srcdir)/%D
%/arch.h
$(srcdir)/%D
%/arch.c
$(srcdir)/%D
%/cpuall.h
: @CGEN_MAINT@
%D
%/cgen-arch
125 %D
%/cgen-cpu-decode-v10f
:
126 $(AM_V_GEN
)cpu
=crisv10f mach
=crisv10 SUFFIX
=v10 FLAGS
="with-scache with-profile=fn" EXTRAFILES
="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE
)
127 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
$(srcdir)/%D
%/semv10-switch.c
$(srcdir)/%D
%/semcrisv10f-switch.c
128 $(srcdir)/%D
%/cpuv10.h
$(srcdir)/%D
%/cpuv10.c
$(srcdir)/%D
%/semcrisv10f-switch.c
$(srcdir)/%D
%/modelv10.c
$(srcdir)/%D
%/decodev10.c
$(srcdir)/%D
%/decodev10.h
: @CGEN_MAINT@
%D
%/cgen-cpu-decode-v10f
130 %D
%/cgen-cpu-decode-v32f
:
131 $(AM_V_GEN
)cpu
=crisv32f mach
=crisv32 SUFFIX
=v32 FLAGS
="with-scache with-profile=fn" EXTRAFILES
="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE
)
132 $(AM_V_at
)$(SHELL
) $(srcroot
)/move-if-change
$(srcdir)/%D
%/semv32-switch.c
$(srcdir)/%D
%/semcrisv32f-switch.c
133 $(srcdir)/%D
%/cpuv32.h
$(srcdir)/%D
%/cpuv32.c
$(srcdir)/%D
%/semcrisv32f-switch.c
$(srcdir)/%D
%/modelv32.c
$(srcdir)/%D
%/decodev32.c
$(srcdir)/%D
%/decodev32.h
: @CGEN_MAINT@
%D
%/cgen-cpu-decode-v32f