]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/m32r/Makefile.in
272974572ecfbea46bd509c99a7102dac8fc71e9
[thirdparty/binutils-gdb.git] / sim / m32r / Makefile.in
1 # Makefile template for Configure for the m32r simulator
2 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
3 # Contributed by Cygnus Support.
4 #
5 # This file is part of GDB, the GNU debugger.
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 ## COMMON_PRE_CONFIG_FRAG
21
22 M32R_OBJS = m32r.o cpu.o decode.o sem.o model.o mloop.o
23 M32RX_OBJS = m32rx.o cpux.o decodex.o modelx.o mloopx.o
24 M32R2_OBJS = m32r2.o cpu2.o decode2.o model2.o mloop2.o
25 TRAPS_OBJ = @traps_obj@
26
27 SIM_OBJS = \
28 $(SIM_NEW_COMMON_OBJS) \
29 cgen-utils.o cgen-trace.o cgen-scache.o \
30 cgen-run.o \
31 sim-if.o arch.o \
32 $(M32R_OBJS) \
33 $(M32RX_OBJS) \
34 $(M32R2_OBJS) \
35 $(TRAPS_OBJ)
36
37 # Extra headers included by sim-main.h.
38 SIM_EXTRA_DEPS = \
39 $(CGEN_INCLUDE_DEPS) \
40 arch.h cpuall.h m32r-sim.h $(srcdir)/../../opcodes/m32r-desc.h \
41 eng.h engx.h eng2.h
42
43 SIM_EXTRA_CFLAGS = @sim_extra_cflags@
44
45 SIM_EXTRA_CLEAN = m32r-clean
46
47 # Code doesn't build cleanly yet.
48 SIM_WERROR_CFLAGS =
49
50 ## COMMON_POST_CONFIG_FRAG
51
52 arch = m32r
53
54 # M32R objs
55
56 M32RBF_INCLUDE_DEPS = \
57 $(CGEN_MAIN_CPU_DEPS) \
58 cpu.h decode.h eng.h
59
60 # FIXME: Use of `mono' is wip.
61 mloop.c eng.h: stamp-mloop ; @true
62 stamp-mloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
63 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
64 -mono -fast -pbb -switch sem-switch.c \
65 -cpu m32rbf -infile $(srcdir)/mloop.in
66 $(SHELL) $(srcroot)/move-if-change eng.hin eng.h
67 $(SHELL) $(srcroot)/move-if-change mloop.cin mloop.c
68 touch stamp-mloop
69
70 # M32RX objs
71
72 M32RXF_INCLUDE_DEPS = \
73 $(CGEN_MAIN_CPU_DEPS) \
74 cpux.h decodex.h engx.h
75
76 # FIXME: Use of `mono' is wip.
77 mloopx.c engx.h: stamp-xmloop ; @true
78 stamp-xmloop: $(srcdir)/../common/genmloop.sh mloopx.in Makefile
79 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
80 -mono -no-fast -pbb -parallel-write -switch semx-switch.c \
81 -cpu m32rxf -infile $(srcdir)/mloopx.in \
82 -outfile-suffix x
83 $(SHELL) $(srcroot)/move-if-change engx.hin engx.h
84 $(SHELL) $(srcroot)/move-if-change mloopx.cin mloopx.c
85 touch stamp-xmloop
86
87 # M32R2 objs
88
89 M32R2F_INCLUDE_DEPS = \
90 $(CGEN_MAIN_CPU_DEPS) \
91 cpu2.h decode2.h eng2.h
92
93 # FIXME: Use of `mono' is wip.
94 mloop2.c eng2.h: stamp-2mloop ; @true
95 stamp-2mloop: $(srcdir)/../common/genmloop.sh mloop2.in Makefile
96 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
97 -mono -no-fast -pbb -parallel-write -switch sem2-switch.c \
98 -cpu m32r2f -infile $(srcdir)/mloop2.in \
99 -outfile-suffix 2
100 $(SHELL) $(srcroot)/move-if-change eng2.hin eng2.h
101 $(SHELL) $(srcroot)/move-if-change mloop2.cin mloop2.c
102 touch stamp-2mloop
103
104 m32r-clean:
105 rm -f mloop.c eng.h stamp-mloop
106 rm -f mloopx.c engx.h stamp-xmloop
107 rm -f mloop2.c eng2.h stamp-2mloop
108 rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
109 rm -f tmp-*
110
111 # cgen support, enable with --enable-cgen-maint
112 CGEN_MAINT = ; @true
113 # The following line is commented in or out depending upon --enable-cgen-maint.
114 @CGEN_MAINT@CGEN_MAINT =
115
116 # NOTE: Generated source files are specified as full paths,
117 # e.g. $(srcdir)/arch.c, because make may decide the files live
118 # in objdir otherwise.
119
120 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/m32r.cpu Makefile
121 $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
122 archfile=$(CPU_DIR)/m32r.cpu \
123 FLAGS="with-scache with-profile=fn"
124 touch stamp-arch
125 $(srcdir)/arch.h $(srcdir)/arch.c $(srcdir)/cpuall.h: $(CGEN_MAINT) stamp-arch
126 @true
127
128 stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
129 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
130 cpu=m32rbf mach=m32r SUFFIX= \
131 archfile=$(CPU_DIR)/m32r.cpu \
132 FLAGS="with-scache with-profile=fn" \
133 EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
134 touch stamp-cpu
135 $(srcdir)/cpu.h $(srcdir)/sem.c $(srcdir)/sem-switch.c $(srcdir)/model.c $(srcdir)/decode.c $(srcdir)/decode.h: $(CGEN_MAINT) stamp-cpu
136 @true
137
138 stamp-xcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
139 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
140 cpu=m32rxf mach=m32rx SUFFIX=x \
141 archfile=$(CPU_DIR)/m32r.cpu \
142 FLAGS="with-scache with-profile=fn" \
143 EXTRAFILES="$(CGEN_CPU_SEMSW)"
144 touch stamp-xcpu
145 $(srcdir)/cpux.h $(srcdir)/semx-switch.c $(srcdir)/modelx.c $(srcdir)/decodex.c $(srcdir)/decodex.h: $(CGEN_MAINT) stamp-xcpu
146 @true
147
148 stamp-2cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
149 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
150 cpu=m32r2f mach=m32r2 SUFFIX=2 \
151 archfile=$(CPU_DIR)/m32r.cpu \
152 FLAGS="with-scache with-profile=fn" \
153 EXTRAFILES="$(CGEN_CPU_SEMSW)"
154 touch stamp-2cpu
155 $(srcdir)/cpu2.h $(srcdir)/sem2-switch.c $(srcdir)/model2.c $(srcdir)/decode2.c $(srcdir)/decode2.h: $(CGEN_MAINT) stamp-2cpu
156 @true