Home | History | Annotate | Line # | Download | only in cris
      1      1.1  christos ## See sim/Makefile.am
      2      1.1  christos ##
      3  1.1.1.3  christos ## Copyright (C) 2004-2025 Free Software Foundation, Inc.
      4      1.1  christos ## Contributed by Axis Communications.
      5      1.1  christos ##
      6      1.1  christos ## This program is free software; you can redistribute it and/or modify
      7      1.1  christos ## it under the terms of the GNU General Public License as published by
      8      1.1  christos ## the Free Software Foundation; either version 3 of the License, or
      9      1.1  christos ## (at your option) any later version.
     10      1.1  christos ##
     11      1.1  christos ## This program is distributed in the hope that it will be useful,
     12      1.1  christos ## but WITHOUT ANY WARRANTY; without even the implied warranty of
     13      1.1  christos ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14      1.1  christos ## GNU General Public License for more details.
     15      1.1  christos ##
     16      1.1  christos ## You should have received a copy of the GNU General Public License
     17      1.1  christos ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
     18      1.1  christos 
     19  1.1.1.2  christos ## Some CGEN kludges are causing build-time warnings.  See cris.cpu for details.
     20  1.1.1.2  christos AM_CFLAGS_%C%_mloopv10f.o = $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE)
     21  1.1.1.2  christos AM_CFLAGS_%C%_mloopv32f.o = $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE)
     22  1.1.1.2  christos ## Some CGEN assignments use variable names that are nested & repeated.
     23  1.1.1.2  christos AM_CFLAGS_%C%_mloopv10f.o += $(SIM_CFLAG_WNO_SHADOW_LOCAL)
     24  1.1.1.2  christos 
     25  1.1.1.2  christos nodist_%C%_libsim_a_SOURCES = \
     26  1.1.1.2  christos 	%D%/modules.c
     27  1.1.1.2  christos %C%_libsim_a_SOURCES = \
     28  1.1.1.2  christos 	$(common_libcommon_a_SOURCES)
     29  1.1.1.2  christos %C%_libsim_a_LIBADD = \
     30  1.1.1.2  christos 	$(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
     31  1.1.1.2  christos 	$(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
     32  1.1.1.2  christos 	$(patsubst %,%D%/dv-%.o,$(%C%_SIM_EXTRA_HW_DEVICES)) \
     33  1.1.1.2  christos 	\
     34  1.1.1.2  christos 	%D%/cgen-run.o \
     35  1.1.1.2  christos 	%D%/cgen-scache.o \
     36  1.1.1.2  christos 	%D%/cgen-trace.o \
     37  1.1.1.2  christos 	%D%/cgen-utils.o \
     38  1.1.1.2  christos 	\
     39  1.1.1.2  christos 	%D%/arch.o \
     40  1.1.1.2  christos 	%D%/crisv10f.o \
     41  1.1.1.2  christos 	%D%/cpuv10.o \
     42  1.1.1.2  christos 	%D%/decodev10.o \
     43  1.1.1.2  christos 	%D%/modelv10.o \
     44  1.1.1.2  christos 	%D%/mloopv10f.o \
     45  1.1.1.2  christos 	%D%/crisv32f.o \
     46  1.1.1.2  christos 	%D%/cpuv32.o \
     47  1.1.1.2  christos 	%D%/decodev32.o \
     48  1.1.1.2  christos 	%D%/modelv32.o \
     49  1.1.1.2  christos 	%D%/mloopv32f.o \
     50  1.1.1.2  christos 	\
     51  1.1.1.2  christos 	%D%/sim-if.o \
     52  1.1.1.2  christos 	%D%/traps.o
     53  1.1.1.2  christos $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
     54  1.1.1.2  christos 
     55  1.1.1.2  christos noinst_LIBRARIES += %D%/libsim.a
     56  1.1.1.2  christos 
     57  1.1.1.2  christos ## Override wildcards that trigger common/modules.c to be (incorrectly) used.
     58  1.1.1.2  christos %D%/modules.o: %D%/modules.c
     59  1.1.1.2  christos 
     60  1.1.1.2  christos %D%/%.o: common/%.c ; $(SIM_COMPILE)
     61  1.1.1.2  christos -@am__include@ %D%/$(DEPDIR)/*.Po
     62  1.1.1.2  christos 
     63      1.1  christos %C%_run_SOURCES =
     64      1.1  christos %C%_run_LDADD = \
     65      1.1  christos 	%D%/nrun.o \
     66      1.1  christos 	%D%/libsim.a \
     67      1.1  christos 	$(SIM_COMMON_LIBS)
     68      1.1  christos 
     69      1.1  christos noinst_PROGRAMS += %D%/run
     70      1.1  christos 
     71  1.1.1.2  christos %C%_SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
     72  1.1.1.2  christos 
     73      1.1  christos ## rvdummy is just used for testing -- it runs on the same host as `run`.
     74      1.1  christos ## It does nothing if --enable-sim-hardware isn't active.
     75      1.1  christos %C%_rvdummy_SOURCES = %D%/rvdummy.c
     76      1.1  christos %C%_rvdummy_LDADD = $(LIBIBERTY_LIB)
     77      1.1  christos 
     78      1.1  christos check_PROGRAMS += %D%/rvdummy
     79      1.1  christos 
     80  1.1.1.2  christos ## List all generated headers to help Automake dependency tracking.
     81  1.1.1.2  christos BUILT_SOURCES += \
     82      1.1  christos 	%D%/engv10.h \
     83  1.1.1.2  christos 	%D%/engv32.h
     84  1.1.1.2  christos %C%_BUILD_OUTPUTS = \
     85      1.1  christos 	%D%/mloopv10f.c \
     86      1.1  christos 	%D%/stamp-mloop-v10f \
     87      1.1  christos 	%D%/mloopv32f.c \
     88      1.1  christos 	%D%/stamp-mloop-v32f
     89      1.1  christos 
     90  1.1.1.2  christos ## Generating modules.c requires all sources to scan.
     91  1.1.1.2  christos %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
     92      1.1  christos 
     93      1.1  christos ## FIXME: What is mono and what does "Use of `mono' is wip" mean (other
     94      1.1  christos ## than the apparent; some "mono" feature is work in progress)?
     95      1.1  christos %D%/mloopv10f.c %D%/engv10.h: %D%/stamp-mloop-v10f ; @true
     96  1.1.1.2  christos %D%/stamp-mloop-v10f: %D%/mloop.in $(srccom)/genmloop.sh
     97  1.1.1.2  christos 	$(AM_V_GEN)$(CGEN_GEN_MLOOP) \
     98      1.1  christos 		-mono -no-fast -pbb -switch semcrisv10f-switch.c \
     99  1.1.1.2  christos 		-cpu crisv10f -outfile-suffix -v10f
    100      1.1  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng-v10f.hin %D%/engv10.h
    101      1.1  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop-v10f.cin %D%/mloopv10f.c
    102      1.1  christos 	$(AM_V_at)touch $@
    103      1.1  christos 
    104      1.1  christos ## FIXME: What is mono and what does "Use of `mono' is wip" mean (other
    105      1.1  christos ## than the apparent; some "mono" feature is work in progress)?
    106      1.1  christos %D%/mloopv32f.c %D%/engv32.h: %D%/stamp-mloop-v32f ; @true
    107  1.1.1.2  christos %D%/stamp-mloop-v32f: %D%/mloop.in $(srccom)/genmloop.sh
    108  1.1.1.2  christos 	$(AM_V_GEN)$(CGEN_GEN_MLOOP) \
    109      1.1  christos 		-mono -no-fast -pbb -switch semcrisv32f-switch.c \
    110  1.1.1.2  christos 		-cpu crisv32f -outfile-suffix -v32f
    111      1.1  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng-v32f.hin %D%/engv32.h
    112      1.1  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop-v32f.cin %D%/mloopv32f.c
    113      1.1  christos 	$(AM_V_at)touch $@
    114      1.1  christos 
    115  1.1.1.2  christos CLEANFILES += %D%/engv10.h %D%/engv32.h
    116      1.1  christos MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS)
    117  1.1.1.2  christos 
    118  1.1.1.2  christos ## Target that triggers all cgen targets that works when --disable-cgen-maint.
    119  1.1.1.2  christos %D%/cgen: %D%/cgen-arch %D%/cgen-cpu-decode-v10f %D%/cgen-cpu-decode-v32f
    120  1.1.1.2  christos 
    121  1.1.1.2  christos %D%/cgen-arch:
    122  1.1.1.2  christos 	$(AM_V_GEN)mach=crisv10,crisv32 FLAGS="with-scache with-profile=fn"; $(CGEN_GEN_ARCH)
    123  1.1.1.2  christos $(srcdir)/%D%/arch.h $(srcdir)/%D%/arch.c $(srcdir)/%D%/cpuall.h: @CGEN_MAINT@ %D%/cgen-arch
    124  1.1.1.2  christos 
    125  1.1.1.2  christos %D%/cgen-cpu-decode-v10f:
    126  1.1.1.2  christos 	$(AM_V_GEN)cpu=crisv10f mach=crisv10 SUFFIX=v10 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
    127  1.1.1.2  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change $(srcdir)/%D%/semv10-switch.c $(srcdir)/%D%/semcrisv10f-switch.c
    128  1.1.1.2  christos $(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
    129  1.1.1.2  christos 
    130  1.1.1.2  christos %D%/cgen-cpu-decode-v32f:
    131  1.1.1.2  christos 	$(AM_V_GEN)cpu=crisv32f mach=crisv32 SUFFIX=v32 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
    132  1.1.1.2  christos 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change $(srcdir)/%D%/semv32-switch.c $(srcdir)/%D%/semcrisv32f-switch.c
    133  1.1.1.2  christos $(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
    134