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