]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/or1k/local.mk
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / sim / or1k / local.mk
CommitLineData
de8a2781
MF
1## See sim/Makefile.am
2##
1d506c26 3## Copyright (C) 2017-2024 Free Software Foundation, Inc.
de8a2781
MF
4##
5## This program is free software; you can redistribute it and/or modify
6## it under the terms of the GNU General Public License as published by
7## the Free Software Foundation; either version 3 of the License, or
8## (at your option) any later version.
9##
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14##
15## You should have received a copy of the GNU General Public License
16## along with this program. If not, see <http://www.gnu.org/licenses/>.
0a129eb1 17
b7bd5fe9
MF
18AM_CPPFLAGS_%C% = -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31
19
72be276f
MF
20nodist_%C%_libsim_a_SOURCES = \
21 %D%/modules.c
eac2fbdc
MF
22%C%_libsim_a_SOURCES = \
23 $(common_libcommon_a_SOURCES)
4d998e15 24%C%_libsim_a_LIBADD = \
4d998e15
MF
25 $(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
26 $(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
4d998e15
MF
27 \
28 %D%/cgen-accfp.o \
29 %D%/cgen-fpu.o \
30 %D%/cgen-run.o \
31 %D%/cgen-scache.o \
32 %D%/cgen-trace.o \
33 %D%/cgen-utils.o \
34 \
35 %D%/arch.o \
36 %D%/cpu.o \
37 %D%/decode.o \
38 %D%/mloop.o \
39 %D%/model.o \
40 %D%/sem.o \
41 \
42 %D%/or1k.o \
43 %D%/sim-if.o \
44 %D%/traps.o
45$(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
46
47noinst_LIBRARIES += %D%/libsim.a
48
109a0a7e
MF
49## Override wildcards that trigger common/modules.c to be (incorrectly) used.
50%D%/modules.o: %D%/modules.c
51
b36a89d1
MF
52%D%/%.o: common/%.c ; $(SIM_COMPILE)
53-@am__include@ %D%/$(DEPDIR)/*.Po
4d998e15 54
c0c25232
MF
55%C%_run_SOURCES =
56%C%_run_LDADD = \
57 %D%/nrun.o \
58 %D%/libsim.a \
59 $(SIM_COMMON_LIBS)
60
61noinst_PROGRAMS += %D%/run
62
ed939535
MF
63%C%docdir = $(docdir)/%C%
64%C%doc_DATA = %D%/README
65
80636a54
MF
66## List all generated headers to help Automake dependency tracking.
67BUILT_SOURCES += %D%/eng.h
0a129eb1 68%C%_BUILD_OUTPUTS = \
0a129eb1
MF
69 %D%/mloop.c \
70 %D%/stamp-mloop
71
ee3134d0 72## Generating modules.c requires all sources to scan.
437eeee9 73%D%/modules.c: | $(%C%_BUILD_OUTPUTS)
0a129eb1 74
de8a2781 75## FIXME: Use of `mono' is wip.
0a129eb1 76%D%/mloop.c %D%/eng.h: %D%/stamp-mloop ; @true
09d4e6bb
MF
77%D%/stamp-mloop: %D%/mloop.in $(srccom)/genmloop.sh
78 $(AM_V_GEN)$(CGEN_GEN_MLOOP) \
0a129eb1 79 -mono -fast -pbb -switch sem-switch.c \
09d4e6bb 80 -cpu or1k32bf
0a129eb1
MF
81 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng.hin %D%/eng.h
82 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop.cin %D%/mloop.c
83 $(AM_V_at)touch $@
84
7531822f 85CLEANFILES += %D%/eng.h
0a129eb1 86MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS)
f1a0a99c
MF
87
88## Target that triggers all cgen targets that works when --disable-cgen-maint.
89%D%/cgen: %D%/cgen-arch %D%/cgen-cpu-decode
90
91%D%/cgen-arch:
92 $(AM_V_GEN)mach=or32,or32nd FLAGS="with-scache"; $(CGEN_GEN_ARCH)
e7ad52cd 93$(srcdir)/%D%/arch.h $(srcdir)/%D%/arch.c $(srcdir)/%D%/cpuall.h: @CGEN_MAINT@ %D%/cgen-arch
f1a0a99c
MF
94
95%D%/cgen-cpu-decode:
96 $(AM_V_GEN)cpu=or1k32bf mach=or32,or32nd FLAGS="with-scache" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"; $(CGEN_GEN_CPU_DECODE)
e7ad52cd 97$(srcdir)/%D%/cpu.h $(srcdir)/%D%/cpu.c $(srcdir)/%D%/model.c $(srcdir)/%D%/sem.c $(srcdir)/%D%/sem-switch.c $(srcdir)/%D%/decode.c $(srcdir)/%D%/decode.h: @CGEN_MAINT@ %D%/cgen-cpu-decode