1 # Makefile template for Configure for the m32r simulator
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2004
3 # Free Software Foundation, Inc.
4 # Contributed by Cygnus Support.
6 # This file is part of GDB, the GNU debugger.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 ## COMMON_PRE_CONFIG_FRAG
24 M32R_OBJS
= m32r.o cpu.o decode.o sem.o model.o mloop.o
25 M32RX_OBJS
= m32rx.o cpux.o decodex.o modelx.o mloopx.o
26 M32R2_OBJS
= m32r2.o cpu2.o decode2.o model2.o mloop2.o
27 TRAPS_OBJ
= @traps_obj@
29 CONFIG_DEVICES
= dv-sockser.o
33 $(SIM_NEW_COMMON_OBJS
) \
39 cgen-utils.o cgen-trace.o cgen-scache.o \
40 cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
49 # Extra headers included by sim-main.h.
51 $(CGEN_INCLUDE_DEPS
) \
52 arch.h cpuall.h m32r-sim.h
$(srcdir)/..
/..
/opcodes
/m32r-desc.h
54 SIM_EXTRA_CFLAGS
= @sim_extra_cflags@
57 SIM_EXTRA_CLEAN
= m32r-clean
59 # This selects the m32r newlib/libgloss syscall definitions.
60 NL_TARGET
= -DNL_TARGET_m32r
62 ## COMMON_POST_CONFIG_FRAG
66 sim-if.o
: sim-if.c
$(SIM_MAIN_DEPS
) $(srcdir)/..
/common
/sim-core.h
68 arch.o
: arch.c
$(SIM_MAIN_DEPS
)
70 traps.o
: traps.c targ-vals.h
$(SIM_MAIN_DEPS
)
71 traps-linux.o
: traps.c syscall.h targ-vals.h
$(SIM_MAIN_DEPS
)
72 devices.o
: devices.c
$(SIM_MAIN_DEPS
)
76 M32RBF_INCLUDE_DEPS
= \
77 $(CGEN_MAIN_CPU_DEPS
) \
80 m32r.o
: m32r.c
$(M32RBF_INCLUDE_DEPS
)
82 # FIXME: Use of `mono' is wip.
83 mloop.c eng.h
: stamp-mloop
84 stamp-mloop
: $(srcdir)/..
/common
/genmloop.sh mloop.in Makefile
85 $(SHELL
) $(srccom
)/genmloop.sh \
86 -mono
-fast
-pbb
-switch sem-switch.c \
87 -cpu m32rbf
-infile
$(srcdir)/mloop.in
88 $(SHELL
) $(srcroot
)/move-if-change eng.hin eng.h
89 $(SHELL
) $(srcroot
)/move-if-change mloop.cin mloop.c
91 mloop.o
: mloop.c sem-switch.c
$(M32RBF_INCLUDE_DEPS
)
93 cpu.o
: cpu.c
$(M32RBF_INCLUDE_DEPS
)
94 decode.o
: decode.c
$(M32RBF_INCLUDE_DEPS
)
95 sem.o
: sem.c
$(M32RBF_INCLUDE_DEPS
)
96 model.o
: model.c
$(M32RBF_INCLUDE_DEPS
)
100 M32RXF_INCLUDE_DEPS
= \
101 $(CGEN_MAIN_CPU_DEPS
) \
102 cpux.h decodex.h engx.h
104 m32rx.o
: m32rx.c
$(M32RXF_INCLUDE_DEPS
)
106 # FIXME: Use of `mono' is wip.
107 mloopx.c engx.h
: stamp-xmloop
108 stamp-xmloop
: $(srcdir)/..
/common
/genmloop.sh mloopx.in Makefile
109 $(SHELL
) $(srccom
)/genmloop.sh \
110 -mono
-no-fast
-pbb
-parallel-write
-switch semx-switch.c \
111 -cpu m32rxf
-infile
$(srcdir)/mloopx.in \
113 $(SHELL
) $(srcroot
)/move-if-change engx.hin engx.h
114 $(SHELL
) $(srcroot
)/move-if-change mloopx.cin mloopx.c
116 mloopx.o
: mloopx.c semx-switch.c
$(M32RXF_INCLUDE_DEPS
)
118 cpux.o
: cpux.c
$(M32RXF_INCLUDE_DEPS
)
119 decodex.o
: decodex.c
$(M32RXF_INCLUDE_DEPS
)
120 semx.o
: semx.c
$(M32RXF_INCLUDE_DEPS
)
121 modelx.o
: modelx.c
$(M32RXF_INCLUDE_DEPS
)
125 M32R2F_INCLUDE_DEPS
= \
126 $(CGEN_MAIN_CPU_DEPS
) \
127 cpu2.h decode2.h eng2.h
129 m32r2.o
: m32r2.c
$(M32R2F_INCLUDE_DEPS
)
131 # FIXME: Use of `mono' is wip.
132 mloop2.c eng2.h
: stamp-2mloop
133 stamp-2mloop
: $(srcdir)/..
/common
/genmloop.sh mloop2.in Makefile
134 $(SHELL
) $(srccom
)/genmloop.sh \
135 -mono
-no-fast
-pbb
-parallel-write
-switch sem2-switch.c \
136 -cpu m32r2f
-infile
$(srcdir)/mloop2.in \
138 $(SHELL
) $(srcroot
)/move-if-change eng2.hin eng2.h
139 $(SHELL
) $(srcroot
)/move-if-change mloop2.cin mloop2.c
142 mloop2.o
: mloop2.c sem2-switch.c
$(M32R2F_INCLUDE_DEPS
)
143 cpu2.o
: cpu2.c
$(M32R2F_INCLUDE_DEPS
)
144 decode2.o
: decode2.c
$(M32R2F_INCLUDE_DEPS
)
145 sem2.o
: sem2.c
$(M32R2F_INCLUDE_DEPS
)
146 model2.o
: model2.c
$(M32R2F_INCLUDE_DEPS
)
149 rm -f mloop.c eng.h stamp-mloop
150 rm -f mloopx.c engx.h stamp-xmloop
151 rm -f mloop2.c eng2.h stamp-2mloop
152 rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
155 # cgen support, enable with --enable-cgen-maint
157 # The following line is commented in or out depending upon --enable-cgen-maint.
158 @CGEN_MAINT@CGEN_MAINT
=
160 stamp-arch
: $(CGEN_READ_SCM
) $(CGEN_ARCH_SCM
) $(CGEN_CPU_DIR
)/m32r.cpu
161 $(MAKE
) cgen-arch
$(CGEN_FLAGS_TO_PASS
) mach
=all \
162 archfile
=$(CGEN_CPU_DIR
)/m32r.cpu \
163 FLAGS
="with-scache with-profile=fn"
165 arch.h arch.c cpuall.h
: $(CGEN_MAINT
) stamp-arch
167 stamp-cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/m32r.cpu
168 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
169 cpu
=m32rbf mach
=m32r SUFFIX
= \
170 archfile
=$(CGEN_CPU_DIR
)/m32r.cpu \
171 FLAGS
="with-scache with-profile=fn" \
172 EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
174 cpu.h sem.c sem-switch.c model.c decode.c decode.h
: $(CGEN_MAINT
) stamp-cpu
176 stamp-xcpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/m32r.cpu
177 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
178 cpu
=m32rxf mach
=m32rx SUFFIX
=x \
179 archfile
=$(CGEN_CPU_DIR
)/m32r.cpu \
180 FLAGS
="with-scache with-profile=fn" \
181 EXTRAFILES
="$(CGEN_CPU_SEMSW)"
183 cpux.h semx-switch.c modelx.c decodex.c decodex.h
: $(CGEN_MAINT
) stamp-xcpu
185 stamp-2cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/m32r.cpu
186 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
187 cpu
=m32r2f mach
=m32r2 SUFFIX
=2 \
188 archfile
=$(CGEN_CPU_DIR
)/m32r.cpu \
189 FLAGS
="with-scache with-profile=fn" \
190 EXTRAFILES
="$(CGEN_CPU_SEMSW)"
192 cpu2.h sem2-switch.c model2.c decode2.c decode2.h
: $(CGEN_MAINT
) stamp-2cpu