sim: m32r: unify ELF & Linux traps logic
[deliverable/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
26 SIM_OBJS = \
27 $(SIM_NEW_COMMON_OBJS) \
28 cgen-utils.o cgen-trace.o cgen-scache.o \
29 cgen-run.o \
30 sim-if.o arch.o \
31 $(M32R_OBJS) \
32 $(M32RX_OBJS) \
33 $(M32R2_OBJS) \
34 traps.o
35
36 SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
37
38 # Extra headers included by sim-main.h.
39 SIM_EXTRA_DEPS = \
40 $(CGEN_INCLUDE_DEPS) \
41 arch.h cpuall.h m32r-sim.h $(srcdir)/../../opcodes/m32r-desc.h \
42 eng.h engx.h eng2.h
43
44 SIM_EXTRA_CLEAN = m32r-clean
45
46 # Code doesn't build cleanly yet.
47 SIM_WERROR_CFLAGS =
48
49 ## COMMON_POST_CONFIG_FRAG
50
51 arch = m32r
52
53 # M32R objs
54
55 M32RBF_INCLUDE_DEPS = \
56 $(CGEN_MAIN_CPU_DEPS) \
57 cpu.h decode.h eng.h
58
59 # FIXME: Use of `mono' is wip.
60 mloop.c eng.h: stamp-mloop ; @true
61 stamp-mloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
62 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
63 -mono -fast -pbb -switch sem-switch.c \
64 -cpu m32rbf -infile $(srcdir)/mloop.in
65 $(SHELL) $(srcroot)/move-if-change eng.hin eng.h
66 $(SHELL) $(srcroot)/move-if-change mloop.cin mloop.c
67 touch stamp-mloop
68
69 # M32RX objs
70
71 M32RXF_INCLUDE_DEPS = \
72 $(CGEN_MAIN_CPU_DEPS) \
73 cpux.h decodex.h engx.h
74
75 # FIXME: Use of `mono' is wip.
76 mloopx.c engx.h: stamp-xmloop ; @true
77 stamp-xmloop: $(srcdir)/../common/genmloop.sh mloopx.in Makefile
78 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
79 -mono -no-fast -pbb -parallel-write -switch semx-switch.c \
80 -cpu m32rxf -infile $(srcdir)/mloopx.in \
81 -outfile-suffix x
82 $(SHELL) $(srcroot)/move-if-change engx.hin engx.h
83 $(SHELL) $(srcroot)/move-if-change mloopx.cin mloopx.c
84 touch stamp-xmloop
85
86 # M32R2 objs
87
88 M32R2F_INCLUDE_DEPS = \
89 $(CGEN_MAIN_CPU_DEPS) \
90 cpu2.h decode2.h eng2.h
91
92 # FIXME: Use of `mono' is wip.
93 mloop2.c eng2.h: stamp-2mloop ; @true
94 stamp-2mloop: $(srcdir)/../common/genmloop.sh mloop2.in Makefile
95 $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
96 -mono -no-fast -pbb -parallel-write -switch sem2-switch.c \
97 -cpu m32r2f -infile $(srcdir)/mloop2.in \
98 -outfile-suffix 2
99 $(SHELL) $(srcroot)/move-if-change eng2.hin eng2.h
100 $(SHELL) $(srcroot)/move-if-change mloop2.cin mloop2.c
101 touch stamp-2mloop
102
103 m32r-clean:
104 rm -f mloop.c eng.h stamp-mloop
105 rm -f mloopx.c engx.h stamp-xmloop
106 rm -f mloop2.c eng2.h stamp-2mloop
107 rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
108 rm -f tmp-*
109
110 # NOTE: Generated source files are specified as full paths,
111 # e.g. $(srcdir)/arch.c, because make may decide the files live
112 # in objdir otherwise.
113
114 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/m32r.cpu Makefile
115 $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
116 archfile=$(CPU_DIR)/m32r.cpu \
117 FLAGS="with-scache with-profile=fn"
118 touch stamp-arch
119 $(srcdir)/arch.h $(srcdir)/arch.c $(srcdir)/cpuall.h: $(CGEN_MAINT) stamp-arch
120 @true
121
122 stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
123 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
124 cpu=m32rbf mach=m32r SUFFIX= \
125 archfile=$(CPU_DIR)/m32r.cpu \
126 FLAGS="with-scache with-profile=fn" \
127 EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
128 touch stamp-cpu
129 $(srcdir)/cpu.h $(srcdir)/sem.c $(srcdir)/sem-switch.c $(srcdir)/model.c $(srcdir)/decode.c $(srcdir)/decode.h: $(CGEN_MAINT) stamp-cpu
130 @true
131
132 stamp-xcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
133 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
134 cpu=m32rxf mach=m32rx SUFFIX=x \
135 archfile=$(CPU_DIR)/m32r.cpu \
136 FLAGS="with-scache with-profile=fn" \
137 EXTRAFILES="$(CGEN_CPU_SEMSW)"
138 touch stamp-xcpu
139 $(srcdir)/cpux.h $(srcdir)/semx-switch.c $(srcdir)/modelx.c $(srcdir)/decodex.c $(srcdir)/decodex.h: $(CGEN_MAINT) stamp-xcpu
140 @true
141
142 stamp-2cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/m32r.cpu Makefile
143 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
144 cpu=m32r2f mach=m32r2 SUFFIX=2 \
145 archfile=$(CPU_DIR)/m32r.cpu \
146 FLAGS="with-scache with-profile=fn" \
147 EXTRAFILES="$(CGEN_CPU_SEMSW)"
148 touch stamp-2cpu
149 $(srcdir)/cpu2.h $(srcdir)/sem2-switch.c $(srcdir)/model2.c $(srcdir)/decode2.c $(srcdir)/decode2.h: $(CGEN_MAINT) stamp-2cpu
150 @true
This page took 0.031592 seconds and 4 git commands to generate.