Home | History | Annotate | Line # | Download | only in frv
      1 ## See sim/Makefile.am
      2 ##
      3 ## Copyright (C) 1998-2024 Free Software Foundation, Inc.
      4 ## Contributed by Red Hat.
      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.
     10 ##
     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.
     15 ##
     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/>.
     18 
     19 AM_CPPFLAGS_%C% = $(SIM_FRV_TRAPDUMP_FLAGS)
     20 
     21 nodist_%C%_libsim_a_SOURCES = \
     22 	%D%/modules.c
     23 %C%_libsim_a_SOURCES = \
     24 	$(common_libcommon_a_SOURCES)
     25 %C%_libsim_a_LIBADD = \
     26 	$(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
     27 	$(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
     28 	\
     29 	%D%/cgen-accfp.o \
     30 	%D%/cgen-fpu.o \
     31 	%D%/cgen-run.o \
     32 	%D%/cgen-scache.o \
     33 	%D%/cgen-trace.o \
     34 	%D%/cgen-utils.o \
     35 	\
     36 	%D%/arch.o \
     37 	%D%/cgen-par.o \
     38 	%D%/cpu.o \
     39 	%D%/decode.o \
     40 	%D%/frv.o \
     41 	%D%/mloop.o \
     42 	%D%/model.o \
     43 	%D%/sem.o \
     44 	\
     45 	%D%/cache.o \
     46 	%D%/interrupts.o \
     47 	%D%/memory.o \
     48 	%D%/options.o \
     49 	%D%/pipeline.o \
     50 	%D%/profile.o \
     51 	%D%/profile-fr400.o \
     52 	%D%/profile-fr450.o \
     53 	%D%/profile-fr500.o \
     54 	%D%/profile-fr550.o \
     55 	%D%/registers.o \
     56 	%D%/reset.o \
     57 	%D%/sim-if.o \
     58 	%D%/traps.o
     59 $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
     60 
     61 noinst_LIBRARIES += %D%/libsim.a
     62 
     63 ## Override wildcards that trigger common/modules.c to be (incorrectly) used.
     64 %D%/modules.o: %D%/modules.c
     65 
     66 %D%/%.o: common/%.c ; $(SIM_COMPILE)
     67 -@am__include@ %D%/$(DEPDIR)/*.Po
     68 
     69 %C%_run_SOURCES =
     70 %C%_run_LDADD = \
     71 	%D%/nrun.o \
     72 	%D%/libsim.a \
     73 	$(SIM_COMMON_LIBS)
     74 
     75 noinst_PROGRAMS += %D%/run
     76 
     77 %C%docdir = $(docdir)/%C%
     78 %C%doc_DATA = %D%/README
     79 
     80 ## List all generated headers to help Automake dependency tracking.
     81 BUILT_SOURCES += %D%/eng.h
     82 %C%_BUILD_OUTPUTS = \
     83 	%D%/mloop.c \
     84 	%D%/stamp-mloop
     85 
     86 ## Generating modules.c requires all sources to scan.
     87 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
     88 
     89 ## FIXME: Use of `mono' is wip.
     90 %D%/mloop.c %D%/eng.h: %D%/stamp-mloop ; @true
     91 %D%/stamp-mloop: %D%/mloop.in $(srccom)/genmloop.sh
     92 	$(AM_V_GEN)$(CGEN_GEN_MLOOP) \
     93 		-mono -scache -parallel-generic-write -parallel-only \
     94 		-cpu frvbf
     95 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng.hin %D%/eng.h
     96 	$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop.cin %D%/mloop.c
     97 	$(AM_V_at)touch $@
     98 
     99 CLEANFILES += %D%/eng.h
    100 MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS)
    101 
    102 ## Target that triggers all cgen targets that works when --disable-cgen-maint.
    103 %D%/cgen: %D%/cgen-arch %D%/cgen-cpu-decode
    104 
    105 %D%/cgen-arch:
    106 	$(AM_V_GEN)mach=all FLAGS="with-scache"; $(CGEN_GEN_ARCH)
    107 $(srcdir)/%D%/arch.h $(srcdir)/%D%/arch.c $(srcdir)/%D%/cpuall.h: @CGEN_MAINT@ %D%/cgen-arch
    108 
    109 %D%/cgen-cpu-decode:
    110 	$(AM_V_GEN)cpu=frvbf mach=frv,fr550,fr500,fr450,fr400,tomcat,simple FLAGS="with-scache with-profile=fn with-generic-write with-parallel-only" EXTRAFILES="$(CGEN_CPU_SEM)"; $(CGEN_GEN_CPU_DECODE)
    111 $(srcdir)/%D%/cpu.h $(srcdir)/%D%/sem.c $(srcdir)/%D%/model.c $(srcdir)/%D%/decode.c $(srcdir)/%D%/decode.h: @CGEN_MAINT@ %D%/cgen-cpu-decode
    112