]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/cris/Makefile.in
This commit was generated by cvs2svn to track changes on a CVS vendor
[thirdparty/binutils-gdb.git] / sim / cris / Makefile.in
1 # Makefile template for Configure for the CRIS simulator, based on a mix
2 # of the ones for m32r and i960.
3 #
4 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
5 # Contributed by Axis Communications.
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 2 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 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.
20
21 ## COMMON_PRE_CONFIG_FRAG
22
23 CRISV10F_OBJS = crisv10f.o cpuv10.o decodev10.o modelv10.o mloopv10f.o
24 CRISV32F_OBJS = crisv32f.o cpuv32.o decodev32.o modelv32.o mloopv32f.o
25
26 CONFIG_DEVICES =
27
28 SIM_OBJS = \
29 $(SIM_NEW_COMMON_OBJS) \
30 sim-cpu.o \
31 sim-hload.o \
32 sim-hrw.o \
33 sim-model.o \
34 sim-reg.o \
35 cgen-utils.o cgen-trace.o cgen-scache.o \
36 cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
37 sim-if.o arch.o \
38 $(CRISV10F_OBJS) \
39 $(CRISV32F_OBJS) \
40 traps.o devices.o \
41 $(CONFIG_DEVICES) \
42 cris-desc.o
43
44 # Extra headers included by sim-main.h.
45 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
46 SIM_EXTRA_DEPS = \
47 $(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
48 arch.h cpuall.h cris-sim.h cris-desc.h
49
50 SIM_RUN_OBJS = nrun.o
51 SIM_EXTRA_CLEAN = cris-clean
52
53 # This selects the cris newlib/libgloss syscall definitions.
54 NL_TARGET = -DNL_TARGET_cris
55
56 ## COMMON_POST_CONFIG_FRAG
57
58 CGEN_CPU_DIR = $(CGENDIR)/../cpu
59
60 arch = cris
61
62 sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(sim-core_h) $(sim-options_h)
63
64 # Needs CPU-specific knowledge.
65 dv-cris.o: dv-cris.c $(SIM_MAIN_DEPS) $(sim-core_h)
66
67 # This is the same rule as dv-core.o etc.
68 dv-rv.o: dv-rv.c $(hw_main_headers) $(sim_main_headers)
69
70 arch.o: arch.c $(SIM_MAIN_DEPS)
71
72 traps.o: traps.c targ-vals.h $(SIM_MAIN_DEPS) $(sim-options_h)
73 devices.o: devices.c $(SIM_MAIN_DEPS)
74
75 # rvdummy is just used for testing. It does nothing if
76 # --enable-sim-hardware isn't active.
77
78 all: rvdummy$(EXEEXT)
79
80 check: rvdummy$(EXEEXT)
81
82 rvdummy$(EXEEXT): rvdummy.o $(EXTRA_LIBDEPS)
83 $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LIBS)
84
85 rvdummy.o: rvdummy.c config.h tconfig.h $(remote_sim_h) $(callback_h)
86
87 # CRISV10 objs
88
89 CRISV10F_INCLUDE_DEPS = \
90 $(CGEN_MAIN_CPU_DEPS) \
91 cpuv10.h decodev10.h engv10.h
92
93 crisv10f.o: crisv10f.c cris-tmpl.c $(CRISV10F_INCLUDE_DEPS)
94
95 # FIXME: What is mono and what does "Use of `mono' is wip" mean (other
96 # than the apparent; some "mono" feature is work in progress)?
97 mloopv10f.c engv10.h: stamp-v10fmloop
98 stamp-v10fmloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
99 $(SHELL) $(srccom)/genmloop.sh \
100 -mono -no-fast -pbb -switch semcrisv10f-switch.c \
101 -cpu crisv10f -infile $(srcdir)/mloop.in
102 $(SHELL) $(srcroot)/move-if-change eng.hin engv10.h
103 $(SHELL) $(srcroot)/move-if-change mloop.cin mloopv10f.c
104 touch stamp-v10fmloop
105 mloopv10f.o: mloopv10f.c semcrisv10f-switch.c $(CRISV10F_INCLUDE_DEPS)
106
107 cpuv10.o: cpuv10.c $(CRISV10F_INCLUDE_DEPS)
108 decodev10.o: decodev10.c $(CRISV10F_INCLUDE_DEPS)
109 modelv10.o: modelv10.c $(CRISV10F_INCLUDE_DEPS)
110
111 # CRISV32 objs
112
113 CRISV32F_INCLUDE_DEPS = \
114 $(CGEN_MAIN_CPU_DEPS) \
115 cpuv32.h decodev32.h engv32.h
116
117 crisv32f.o: crisv32f.c cris-tmpl.c $(CRISV32F_INCLUDE_DEPS)
118
119 # FIXME: What is mono and what does "Use of `mono' is wip" mean (other
120 # than the apparent; some "mono" feature is work in progress)?
121 mloopv32f.c engv32.h: stamp-v32fmloop
122 # We depend on stamp-v10fmloop to get serialization to avoid
123 # racing with it for the same temporary file-names when "make -j".
124 stamp-v32fmloop: stamp-v10fmloop $(srcdir)/../common/genmloop.sh mloop.in Makefile
125 $(SHELL) $(srccom)/genmloop.sh \
126 -mono -no-fast -pbb -switch semcrisv32f-switch.c \
127 -cpu crisv32f -infile $(srcdir)/mloop.in
128 $(SHELL) $(srcroot)/move-if-change eng.hin engv32.h
129 $(SHELL) $(srcroot)/move-if-change mloop.cin mloopv32f.c
130 touch stamp-v32fmloop
131 mloopv32f.o: mloopv32f.c semcrisv32f-switch.c $(CRISV32F_INCLUDE_DEPS)
132
133 cpuv32.o: cpuv32.c $(CRISV32F_INCLUDE_DEPS)
134 decodev32.o: decodev32.c $(CRISV32F_INCLUDE_DEPS)
135 modelv32.o: modelv32.c $(CRISV32F_INCLUDE_DEPS)
136
137 cris-clean:
138 for v in 10 32; do \
139 rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
140 rm -f stamp-v$${v}fcpu; \
141 done
142 -rm -f stamp-arch stamp-desc
143 -rm -f tmp-*
144
145 # cgen support, enable with --enable-cgen-maint
146 CGEN_MAINT = ; @true
147 # The following line is commented in or out depending upon --enable-cgen-maint.
148 @CGEN_MAINT@CGEN_MAINT =
149
150 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
151 stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
152
153 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
154 $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
155 archfile=$(CGEN_CPU_DIR)/cris.cpu \
156 FLAGS="with-scache with-profile=fn"
157 touch stamp-arch
158 arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
159
160 # The sed-hack is supposed to be temporary, until we get CGEN to emit it.
161 stamp-v10fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
162 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
163 archfile=$(CGEN_CPU_DIR)/cris.cpu \
164 cpu=crisv10f mach=crisv10 SUFFIX=v10 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
165 $(SHELL) $(srcroot)/move-if-change $(srcdir)/semv10-switch.c $(srcdir)/semcrisv10f-switch.c
166 sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev10.c > decodev10.c.tmp
167 mv decodev10.c.tmp $(srcdir)/decodev10.c
168 touch stamp-v10fcpu
169 cpuv10.h cpuv10.c semcrisv10f-switch.c modelv10.c decodev10.c decodev10.h: $(CGEN_MAINT) stamp-v10fcpu
170
171 stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
172 $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
173 archfile=$(CGEN_CPU_DIR)/cris.cpu \
174 cpu=crisv32f mach=crisv32 SUFFIX=v32 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
175 $(SHELL) $(srcroot)/move-if-change $(srcdir)/semv32-switch.c $(srcdir)/semcrisv32f-switch.c
176 sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev32.c > decodev32.c.tmp
177 mv decodev32.c.tmp $(srcdir)/decodev32.c
178 touch stamp-v32fcpu
179 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
180
181 stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
182 $(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
183 archfile=$(CGEN_CPU_DIR)/cris.cpu \
184 cpu=cris mach=all
185 touch stamp-desc
186 cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc