fix typo.
[deliverable/binutils-gdb.git] / sim / ppc / Makefile.in
1 #
2 # This file is part of the program psim.
3 #
4 # Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20
21 VPATH = @srcdir@
22 srcdir = @srcdir@
23 srcroot = $(srcdir)/../..
24
25 prefix = @prefix@
26 exec_prefix = @exec_prefix@
27
28 host_alias = @host_alias@
29 target_alias = @target_alias@
30 program_transform_name = @program_transform_name@
31 bindir = $(exec_prefix)/bin
32 libdir = $(exec_prefix)/lib
33 tooldir = $(libdir)/$(target_alias)
34
35 datadir = $(prefix)/lib
36 mandir = $(prefix)/man
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
39 man3dir = $(mandir)/man3
40 man4dir = $(mandir)/man4
41 man5dir = $(mandir)/man5
42 man6dir = $(mandir)/man6
43 man7dir = $(mandir)/man7
44 man8dir = $(mandir)/man8
45 man9dir = $(mandir)/man9
46 infodir = $(prefix)/info
47 includedir = $(prefix)/include
48 docdir = $(datadir)/doc
49
50 SHELL = /bin/sh
51
52 INSTALL = $(srcroot)/install.sh -c
53 INSTALL_PROGRAM = $(INSTALL)
54 INSTALL_DATA = $(INSTALL)
55 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
56 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
57
58 AR = @AR@
59 AR_FLAGS = rc
60 CC = @CC@
61 CFLAGS = @CFLAGS@
62 CC_FOR_BUILD = @CC_FOR_BUILD@
63 BISON = bison
64 MAKEINFO = makeinfo
65 RANLIB = @RANLIB@
66
67 HDEFINES = @HDEFINES@
68 TDEFINES =
69
70 .NOEXPORT:
71 MAKEOVERRIDES=
72
73 LIB_INCLUDES = -I$(srcdir)/../../include
74 BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
75 GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
76 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
77
78 CONFIG_FILE = std-config.h
79
80 LIBIBERTY_LIB = ../../libiberty/libiberty.a
81 BFD_LIB = ../../bfd/libbfd.a
82
83 TARGETLIB = libsim.a
84
85 all: run libsim.a $(GDB_OBJ)
86
87 .c.o:
88 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $<
89
90
91
92 BASICS_H = \
93 config.h \
94 ppc-config.h \
95 words.h \
96 ppc-endian.h \
97 debug.h \
98 bits.h \
99 sim_callbacks.h
100
101 PSIM_H = \
102 psim.h \
103 $(BASICS_H)
104
105 IDECODE_H = \
106 idecode.h \
107 idecode_insn.h \
108 idecode_expression.h \
109 idecode_branch.h \
110 idecode_fields.h \
111 icache.h
112
113 REGISTERS_H = \
114 registers.h \
115 spreg.h
116
117 CPU_H = \
118 cpu.h \
119 $(BASICS_H) \
120 $(REGISTERS_H) \
121 device_tree.h \
122 memory_map.h \
123 core.h \
124 vm.h \
125 events.h \
126 interrupts.h \
127 psim.h \
128 icache.h
129
130
131 INLINE = \
132 inline.h \
133 inline.c
134
135 BUILT_SRC = \
136 icache.h \
137 idecode.h idecode.c \
138 semantics.h semantics.c \
139 spreg.h spreg.c \
140 config.h \
141 ppc-config.h
142
143 LIB_SRC = \
144 psim.c \
145 bits.c \
146 ppc-endian.c \
147 debug.c \
148 memory_map.c \
149 vm.c \
150 core.c \
151 events.c \
152 system.c \
153 registers.c \
154 cpu.c \
155 interrupts.c \
156 devices.c \
157 device_tree.c
158
159 MAIN_SRC = \
160 main.c \
161 sim_calls.c
162
163
164 LIB_OBJ = \
165 debug.o \
166 bits.o \
167 ppc-endian.o \
168 system.o \
169 registers.o \
170 memory_map.o \
171 vm.o \
172 core.o \
173 spreg.o \
174 cpu.o \
175 interrupts.o \
176 events.o \
177 devices.o \
178 device_tree.o \
179 semantics.o \
180 idecode.o \
181 psim.o
182
183
184 GDB_OBJ = sim_calls.o
185
186
187 psim: libsim.a main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS)
188 $(CC) $(CFLAGS) $(LDFLAGS) -o psim main.o libsim.a $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
189
190 run: psim
191 rm -f run
192 ln psim run
193
194 libsim.a: $(BUILT_SRC) $(LIB_OBJ) $(GDB_OBJ)
195 rm -f $(TARGETLIB)
196 $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
197 $(RANLIB) $(TARGETLIB)
198
199 psim.o: psim.c psim.h $(CPU_H) $(IDECODE_H) $(INLINE)
200
201 bits.o: bits.c bits.h
202
203 debug.o: debug.c $(BASICS_H)
204
205 ppc-endian.o: ppc-endian.c ppc-endian.h \
206 config.h ppc-config.h words.h sim_callbacks.h
207
208 system.o: system.c system.h $(CPU_H) $(IDECODE_H)
209
210 registers.o: registers.c $(REGISTERS_H) $(BASICS_H)
211
212 cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
213
214 interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) system.h
215
216 idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h
217
218 memory_map.o: memory_map.c memory_map.h $(BASICS_H) device_tree.h interrupts.h
219
220 # double.o: double.c dp-bit.c
221
222 vm.o: vm.c vm.h $(BASICS_H) $(REGISTERS_H) \
223 device_tree.h memory_map.h core.h interrupts.h
224
225 core.o: core.c core.h $(BASICS_H) \
226 device_tree.h memory_map.h
227
228 events.o: events.c events.h $(BASICS_H)
229
230 sim_calls.o: sim_calls.c $(PSIM_H) ../../gdb/tm.h devices.h
231
232 spreg.o: spreg.h spreg.c words.h
233
234 main.o: main.c $(PSIM_H)
235
236 devices.o: devices.c devices.h $(BASICS_H) \
237 device_tree.h events.h
238
239 device_tree.o: device_tree.c device_tree.h devices.h $(BASICS_H)
240
241 semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
242
243
244 #
245 # Rules to create the built c source code files
246 #
247
248 ppc-config.h: $(CONFIG_FILE)
249 cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
250
251
252 tmp-gencode: gen ppc-instructions ppc-spr-table $(srcdir)/../../move-if-change
253 ./gen -r $(srcdir)/ppc-spr-table \
254 -P tmp-spreg.h \
255 -p tmp-spreg.c \
256 -i $(srcdir)/ppc-instructions \
257 -C tmp-icache.h \
258 -S tmp-semantics.h \
259 -s tmp-semantics.c \
260 -D tmp-idecode.h \
261 -d tmp-idecode.c
262 $(srcdir)/../../move-if-change tmp-icache.h icache.h
263 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
264 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
265 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
266 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
267 $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
268 $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
269 touch tmp-gencode
270
271 icache.h idecode.h idecode.c semantics.h semantics.c spreg.h spreg.c: tmp-gencode
272
273 gen.o: gen.c config.h ppc-config.h
274 $(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(srcdir)/gen.c
275
276 gen: gen.o config.h ppc-config.h $(LIBIBERTY_LIB) $(LIBS)
277 $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o gen gen.o $(LIBIBERTY_LIB) $(LIBS)
278
279 #
280
281 tags etags: TAGS
282
283 TAGS: tmp-gencode config.h ppc-config.h
284 etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
285
286 clean mostlyclean:
287 rm -f tmp-* *.[oas] core psim run gen config.log
288
289 distclean realclean: clean
290 rm -f TAGS $(BUILT_SRC) Makefile config.cache config.status config.h stamp-h
291
292 Makefile: Makefile.in config.status
293 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
294
295 config.h: stamp-h ; @true
296 stamp-h: config.in config.status
297 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
298
299 config.status: configure
300 $(SHELL) ./config.status --recheck
301
302 install:
303 $(INSTALL_XFORM) run $(bindir)/run
304
This page took 0.036837 seconds and 5 git commands to generate.