1 # Makefile template for Configure for the m32r simulator
2 # Copyright (C) 1996, 1997, 1998, 1999 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 2 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 along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ## COMMON_PRE_CONFIG_FRAG
23 M32R_OBJS
= m32r.o cpu.o decode.o sem.o model.o mloop.o
24 # start-sanitize-cygnus
25 M32RX_OBJS
= m32rx.o cpux.o decodex.o modelx.o mloopx.o
28 CONFIG_DEVICES
= dv-sockser.o
32 $(SIM_NEW_COMMON_OBJS
) \
38 cgen-utils.o cgen-trace.o cgen-scache.o \
39 cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
42 $(start-sanitize-cygnus
) \
44 $(end-sanitize-cygnus
) \
48 # Extra headers included by sim-main.h.
50 $(CGEN_INCLUDE_DEPS
) \
51 arch.h cpuall.h m32r-sim.h
$(srcdir)/..
/..
/opcodes
/m32r-desc.h
56 SIM_EXTRA_CLEAN
= m32r-clean
58 # This selects the m32r newlib/libgloss syscall definitions.
59 NL_TARGET
= -DNL_TARGET_m32r
61 ## COMMON_POST_CONFIG_FRAG
65 sim-if.o
: sim-if.c
$(SIM_MAIN_DEPS
) $(srcdir)/..
/common
/sim-core.h
67 arch.o
: arch.c
$(SIM_MAIN_DEPS
)
69 traps.o
: traps.c targ-vals.h
$(SIM_MAIN_DEPS
)
70 devices.o
: devices.c
$(SIM_MAIN_DEPS
)
74 M32RBF_INCLUDE_DEPS
= \
75 $(CGEN_MAIN_CPU_DEPS
) \
78 m32r.o
: m32r.c
$(M32RBF_INCLUDE_DEPS
)
80 # FIXME: Use of `mono' is wip.
81 mloop.c eng.h
: stamp-mloop
82 stamp-mloop
: $(srcdir)/..
/common
/genmloop.sh mloop.in Makefile
83 $(SHELL
) $(srccom
)/genmloop.sh \
84 -mono
-fast
-pbb
-switch sem-switch.c \
85 -cpu m32rbf
-infile
$(srcdir)/mloop.in
86 $(SHELL
) $(srcroot
)/move-if-change eng.hin eng.h
87 $(SHELL
) $(srcroot
)/move-if-change mloop.cin mloop.c
89 mloop.o
: mloop.c sem-switch.c
$(M32RBF_INCLUDE_DEPS
)
91 cpu.o
: cpu.c
$(M32RBF_INCLUDE_DEPS
)
92 decode.o
: decode.c
$(M32RBF_INCLUDE_DEPS
)
93 sem.o
: sem.c
$(M32RBF_INCLUDE_DEPS
)
94 model.o
: model.c
$(M32RBF_INCLUDE_DEPS
)
96 # start-sanitize-cygnus
99 M32RXF_INCLUDE_DEPS
= \
100 $(CGEN_MAIN_CPU_DEPS
) \
101 cpux.h decodex.h engx.h
103 m32rx.o
: m32rx.c
$(M32RXF_INCLUDE_DEPS
)
105 # FIXME: Use of `mono' is wip.
106 mloopx.c engx.h
: stamp-xmloop
107 stamp-xmloop
: $(srcdir)/..
/common
/genmloop.sh mloopx.in Makefile
108 $(SHELL
) $(srccom
)/genmloop.sh \
109 -mono
-no-fast
-pbb
-parallel-write
-switch semx-switch.c \
110 -cpu m32rxf
-infile
$(srcdir)/mloopx.in
111 $(SHELL
) $(srcroot
)/move-if-change eng.hin engx.h
112 $(SHELL
) $(srcroot
)/move-if-change mloop.cin mloopx.c
114 mloopx.o
: mloopx.c semx-switch.c
$(M32RXF_INCLUDE_DEPS
)
116 cpux.o
: cpux.c
$(M32RXF_INCLUDE_DEPS
)
117 decodex.o
: decodex.c
$(M32RXF_INCLUDE_DEPS
)
118 semx.o
: semx.c
$(M32RXF_INCLUDE_DEPS
)
119 modelx.o
: modelx.c
$(M32RXF_INCLUDE_DEPS
)
120 # end-sanitize-cygnus
123 rm -f mloop.c eng.h stamp-arch stamp-cpu stamp-mloop
124 # start-sanitize-cygnus
125 rm -f mloopx.c engx.h stamp-xcpu stamp-xmloop
126 # end-sanitize-cygnus
129 # start-sanitize-cygnus
130 # cgen support, enable with --enable-cgen-maint
132 # The following line is commented in or out depending upon --enable-cgen-maint.
133 @CGEN_MAINT@CGEN_MAINT
=
135 stamp-arch
: $(CGEN_MAIN_SCM
) $(CGEN_ARCH_SCM
) $(srccgen
)/m32r.cpu
136 $(MAKE
) cgen-arch
$(CGEN_FLAGS_TO_PASS
) mach
=all \
137 FLAGS
="with-scache with-profile=fn"
139 arch.h arch.c cpuall.h
: $(CGEN_MAINT
) stamp-arch
142 stamp-cpu
: $(CGEN_MAIN_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(srccgen
)/m32r.cpu
143 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
144 cpu
=m32rbf mach
=m32r SUFFIX
= \
145 FLAGS
="with-scache with-profile=fn" \
146 EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
148 cpu.h sem.c sem-switch.c model.c decode.c decode.h
: $(CGEN_MAINT
) stamp-cpu
150 # end-sanitize-cygnus
152 # start-sanitize-cygnus
153 stamp-xcpu
: $(CGEN_MAIN_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(srccgen
)/m32r.cpu
154 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
155 cpu
=m32rxf mach
=m32rx SUFFIX
=x FLAGS
="with-scache with-profile=fn" EXTRAFILES
="$(CGEN_CPU_SEMSW)"
157 cpux.h semx-switch.c modelx.c decodex.c decodex.h
: $(CGEN_MAINT
) stamp-xcpu
159 # end-sanitize-cygnus