1 # Makefile template for Configure for the m32r simulator
2 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
3 # Contributed by Cygnus Support.
5 # This file is part of GDB, the GNU debugger.
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.
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.
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/>.
20 ## COMMON_PRE_CONFIG_FRAG
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@
28 $(SIM_NEW_COMMON_OBJS
) \
29 cgen-utils.o cgen-trace.o cgen-scache.o \
37 # Extra headers included by sim-main.h.
39 $(CGEN_INCLUDE_DEPS
) \
40 arch.h cpuall.h m32r-sim.h
$(srcdir)/..
/..
/opcodes
/m32r-desc.h \
43 SIM_EXTRA_CFLAGS
= @sim_extra_cflags@
45 SIM_EXTRA_CLEAN
= m32r-clean
47 ## COMMON_POST_CONFIG_FRAG
53 M32RBF_INCLUDE_DEPS
= \
54 $(CGEN_MAIN_CPU_DEPS
) \
57 # FIXME: Use of `mono' is wip.
58 mloop.c eng.h
: stamp-mloop
; @true
59 stamp-mloop
: $(srcdir)/..
/common
/genmloop.sh mloop.in Makefile
60 $(SHELL
) $(srccom
)/genmloop.sh
-shell $(SHELL
) \
61 -mono
-fast
-pbb
-switch sem-switch.c \
62 -cpu m32rbf
-infile
$(srcdir)/mloop.in
63 $(SHELL
) $(srcroot
)/move-if-change eng.hin eng.h
64 $(SHELL
) $(srcroot
)/move-if-change mloop.cin mloop.c
69 M32RXF_INCLUDE_DEPS
= \
70 $(CGEN_MAIN_CPU_DEPS
) \
71 cpux.h decodex.h engx.h
73 # FIXME: Use of `mono' is wip.
74 mloopx.c engx.h
: stamp-xmloop
; @true
75 stamp-xmloop
: $(srcdir)/..
/common
/genmloop.sh mloopx.in Makefile
76 $(SHELL
) $(srccom
)/genmloop.sh
-shell $(SHELL
) \
77 -mono
-no-fast
-pbb
-parallel-write
-switch semx-switch.c \
78 -cpu m32rxf
-infile
$(srcdir)/mloopx.in \
80 $(SHELL
) $(srcroot
)/move-if-change engx.hin engx.h
81 $(SHELL
) $(srcroot
)/move-if-change mloopx.cin mloopx.c
86 M32R2F_INCLUDE_DEPS
= \
87 $(CGEN_MAIN_CPU_DEPS
) \
88 cpu2.h decode2.h eng2.h
90 # FIXME: Use of `mono' is wip.
91 mloop2.c eng2.h
: stamp-2mloop
; @true
92 stamp-2mloop
: $(srcdir)/..
/common
/genmloop.sh mloop2.in Makefile
93 $(SHELL
) $(srccom
)/genmloop.sh
-shell $(SHELL
) \
94 -mono
-no-fast
-pbb
-parallel-write
-switch sem2-switch.c \
95 -cpu m32r2f
-infile
$(srcdir)/mloop2.in \
97 $(SHELL
) $(srcroot
)/move-if-change eng2.hin eng2.h
98 $(SHELL
) $(srcroot
)/move-if-change mloop2.cin mloop2.c
102 rm -f mloop.c eng.h stamp-mloop
103 rm -f mloopx.c engx.h stamp-xmloop
104 rm -f mloop2.c eng2.h stamp-2mloop
105 rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
108 # cgen support, enable with --enable-cgen-maint
110 # The following line is commented in or out depending upon --enable-cgen-maint.
111 @CGEN_MAINT@CGEN_MAINT
=
113 # NOTE: Generated source files are specified as full paths,
114 # e.g. $(srcdir)/arch.c, because make may decide the files live
115 # in objdir otherwise.
117 stamp-arch
: $(CGEN_READ_SCM
) $(CGEN_ARCH_SCM
) $(CPU_DIR
)/m32r.cpu Makefile
118 $(MAKE
) cgen-arch
$(CGEN_FLAGS_TO_PASS
) mach
=all \
119 archfile
=$(CPU_DIR
)/m32r.cpu \
120 FLAGS
="with-scache with-profile=fn"
122 $(srcdir)/arch.h
$(srcdir)/arch.c
$(srcdir)/cpuall.h
: $(CGEN_MAINT
) stamp-arch
125 stamp-cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CPU_DIR
)/m32r.cpu Makefile
126 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
127 cpu
=m32rbf mach
=m32r SUFFIX
= \
128 archfile
=$(CPU_DIR
)/m32r.cpu \
129 FLAGS
="with-scache with-profile=fn" \
130 EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
132 $(srcdir)/cpu.h
$(srcdir)/sem.c
$(srcdir)/sem-switch.c
$(srcdir)/model.c
$(srcdir)/decode.c
$(srcdir)/decode.h
: $(CGEN_MAINT
) stamp-cpu
135 stamp-xcpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CPU_DIR
)/m32r.cpu Makefile
136 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
137 cpu
=m32rxf mach
=m32rx SUFFIX
=x \
138 archfile
=$(CPU_DIR
)/m32r.cpu \
139 FLAGS
="with-scache with-profile=fn" \
140 EXTRAFILES
="$(CGEN_CPU_SEMSW)"
142 $(srcdir)/cpux.h
$(srcdir)/semx-switch.c
$(srcdir)/modelx.c
$(srcdir)/decodex.c
$(srcdir)/decodex.h
: $(CGEN_MAINT
) stamp-xcpu
145 stamp-2cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CPU_DIR
)/m32r.cpu Makefile
146 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
147 cpu
=m32r2f mach
=m32r2 SUFFIX
=2 \
148 archfile
=$(CPU_DIR
)/m32r.cpu \
149 FLAGS
="with-scache with-profile=fn" \
150 EXTRAFILES
="$(CGEN_CPU_SEMSW)"
152 $(srcdir)/cpu2.h
$(srcdir)/sem2-switch.c
$(srcdir)/model2.c
$(srcdir)/decode2.c
$(srcdir)/decode2.h
: $(CGEN_MAINT
) stamp-2cpu