Initial creation of sourceware repository
[deliverable/binutils-gdb.git] / sim / d30v / Makefile.in
1 # Mitsubishi Electric Corp. D30V Simulator.
2 # Copyright (C) 1997, 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 2, or (at your option)
10 # 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 M4= @M4@
22
23
24 ## COMMON_PRE_CONFIG_FRAG
25
26 # These variables are given default values in COMMON_PRE_CONFIG_FRAG.
27 # We override the ones we need to here.
28 # Not all of these need to be mentioned, only the necessary ones.
29
30 # List of object files, less common parts.
31 SIM_OBJS = \
32 $(SIM_NEW_COMMON_OBJS) \
33 engine.o cpu.o \
34 s_support.o l_support.o \
35 s_idecode.o l_idecode.o \
36 s_semantics.o l_semantics.o \
37 sim-calls.o itable.o \
38 sim-hload.o \
39 sim-hrw.o \
40 sim-engine.o \
41 sim-stop.o \
42 sim-reason.o \
43 sim-resume.o
44
45 # List of extra dependencies.
46 # Generally this consists of simulator specific files included by sim-main.h.
47 SIM_EXTRA_DEPS = itable.h s_idecode.h l_idecode.h cpu.h alu.h
48
49 # List of generators
50 SIM_GEN=tmp-igen
51
52 # List of extra flags to always pass to $(CC).
53 SIM_EXTRA_CFLAGS = @sim_trapdump@
54
55 # List of main object files for `run'.
56 SIM_RUN_OBJS = nrun.o
57
58 # Dependency of `clean' to clean any extra files.
59 SIM_EXTRA_CLEAN = clean-igen
60
61 # This selects the d30v newlib/libgloss syscall definitions.
62 NL_TARGET=-DNL_TARGET_d30v
63
64 ## COMMON_POST_CONFIG_FRAG
65
66 MAIN_INCLUDE_DEPS = tconfig.h
67 INCLUDE_DEPS = $(MAIN_INCLUDE_DEPS) $(SIM_EXTRA_DEPS)
68
69 # Rules need to build $(SIM_OBJS), plus whatever else the target wants.
70
71 # ... target specific rules ...
72
73 # Filter to eliminate known warnings
74 FILTER = 2>&1 | egrep -v "Discarding instruction|instruction field of type \`compute\' changed to \`cache\'|Instruction format is not 64 bits wide"
75
76 BUILT_SRC_FROM_IGEN = \
77 s_icache.h \
78 s_icache.c \
79 s_idecode.h \
80 s_idecode.c \
81 s_semantics.h \
82 s_semantics.c \
83 s_model.h \
84 s_model.c \
85 s_support.h \
86 s_support.c \
87 l_icache.h \
88 l_icache.c \
89 l_idecode.h \
90 l_idecode.c \
91 l_semantics.h \
92 l_semantics.c \
93 l_model.h \
94 l_model.c \
95 l_support.h \
96 l_support.c \
97 itable.h itable.c
98 $(BUILT_SRC_FROM_IGEN): tmp-igen
99 #
100
101 .PHONY: clean-igen
102 clean-igen:
103 rm -f $(BUILT_SRC_FROM_IGEN)
104 rm -f tmp-igen tmp-insns
105
106 ../igen/igen:
107 cd ../igen && $(MAKE)
108
109 tmp-igen: $(srcdir)/dc-short $(srcdir)/d30v-insns $(srcdir)/ic-d30v ../igen/igen
110 cd ../igen && $(MAKE)
111 echo "# 1 \"$(srcdir)/d30v-insns\"" > tmp-insns
112 $(M4) < $(srcdir)/d30v-insns >> tmp-insns
113 @echo "Generating short version ..."
114 ../igen/igen \
115 -G gen-zero-r0 \
116 -G direct-access \
117 -G default-nia-minus-one \
118 -G conditional-issue \
119 -G verify-slot \
120 -G field-widths \
121 -F short,emul \
122 -B 32 \
123 -P "s_" \
124 -o $(srcdir)/dc-short \
125 -k $(srcdir)/ic-d30v \
126 -n $(srcdir)/d30v-insns -i tmp-insns \
127 -n s_icache.h -hc tmp-icache.h \
128 -n s_icache.c -c tmp-icache.c \
129 -n s_semantics.h -hs tmp-semantics.h \
130 -n s_semantics.c -s tmp-semantics.c \
131 -n s_idecode.h -hd tmp-idecode.h \
132 -n s_idecode.c -d tmp-idecode.c \
133 -n s_model.h -hm tmp-model.h \
134 -n s_model.c -m tmp-model.c \
135 -n s_support.h -hf tmp-support.h \
136 -n s_support.c -f tmp-support.c $(FILTER)
137 $(srcdir)/../../move-if-change tmp-icache.h s_icache.h
138 $(srcdir)/../../move-if-change tmp-icache.c s_icache.c
139 $(srcdir)/../../move-if-change tmp-idecode.h s_idecode.h
140 $(srcdir)/../../move-if-change tmp-idecode.c s_idecode.c
141 $(srcdir)/../../move-if-change tmp-semantics.h s_semantics.h
142 $(srcdir)/../../move-if-change tmp-semantics.c s_semantics.c
143 $(srcdir)/../../move-if-change tmp-model.h s_model.h
144 $(srcdir)/../../move-if-change tmp-model.c s_model.c
145 $(srcdir)/../../move-if-change tmp-support.h s_support.h
146 $(srcdir)/../../move-if-change tmp-support.c s_support.c
147 @echo "Generating long version ..."
148 ../igen/igen \
149 -G gen-zero-r0 \
150 -G direct-access \
151 -G default-nia-minus-one \
152 -G conditional-issue \
153 -G field-widths \
154 -F long,emul \
155 -B 64 \
156 -P "l_" \
157 -o $(srcdir)/dc-short \
158 -k $(srcdir)/ic-d30v \
159 -i tmp-insns \
160 -n l_icache.h -hc tmp-icache.h \
161 -n l_icache.c -c tmp-icache.c \
162 -n l_semantics.h -hs tmp-semantics.h \
163 -n l_semantics.c -s tmp-semantics.c \
164 -n l_idecode.h -hd tmp-idecode.h \
165 -n l_idecode.c -d tmp-idecode.c \
166 -n l_model.h -hm tmp-model.h \
167 -n l_model.c -m tmp-model.c \
168 -n l_support.h -hf tmp-support.h \
169 -n l_support.c -f tmp-support.c $(FILTER)
170 $(srcdir)/../../move-if-change tmp-icache.h l_icache.h
171 $(srcdir)/../../move-if-change tmp-icache.c l_icache.c
172 $(srcdir)/../../move-if-change tmp-idecode.h l_idecode.h
173 $(srcdir)/../../move-if-change tmp-idecode.c l_idecode.c
174 $(srcdir)/../../move-if-change tmp-semantics.h l_semantics.h
175 $(srcdir)/../../move-if-change tmp-semantics.c l_semantics.c
176 $(srcdir)/../../move-if-change tmp-model.h l_model.h
177 $(srcdir)/../../move-if-change tmp-model.c l_model.c
178 $(srcdir)/../../move-if-change tmp-support.h l_support.h
179 $(srcdir)/../../move-if-change tmp-support.c l_support.c
180 @echo "Generating instruction database ..."
181 ../igen/igen \
182 -G field-widths \
183 -F short,long,emul \
184 -B 64 \
185 -o $(srcdir)/dc-short \
186 -k $(srcdir)/ic-d30v \
187 -i tmp-insns \
188 -n itable.h -ht tmp-itable.h \
189 -n itable.c -t tmp-itable.c $(FILTER)
190 $(srcdir)/../../move-if-change tmp-itable.h itable.h
191 $(srcdir)/../../move-if-change tmp-itable.c itable.c
192 touch tmp-igen
193
194 ENGINE_H = \
195 sim-main.h \
196 $(srcdir)/../common/sim-basics.h \
197 config.h \
198 $(srcdir)/../common/sim-config.h \
199 $(srcdir)/../common/sim-inline.h \
200 $(srcdir)/../common/sim-types.h \
201 $(srcdir)/../common/sim-bits.h \
202 $(srcdir)/../common/sim-endian.h \
203 itable.h \
204 l_idecode.h s_idecode.h \
205 cpu.h \
206 alu.h \
207 $(srcdir)/../common/sim-alu.h \
208 $(srcdir)/../common/sim-core.h \
209 $(srcdir)/../common/sim-events.h \
210
211 engine.o: engine.c $(ENGINE_H)
212 sim-calls.o: sim-calls.c $(ENGINE_H) $(srcdir)/../common/sim-utils.h $(srcdir)/../common/sim-options.h
213 cpu.o: cpu.c $(ENGINE_H)
214 s_support.o: s_support.c $(ENGINE_H)
215 l_support.o: l_support.c $(ENGINE_H)
216 s_semantics.o: s_semantics.c $(ENGINE_H)
217 l_semantics.o: l_semantics.c $(ENGINE_H)
This page took 0.034665 seconds and 4 git commands to generate.