]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/ppc/Makefile.in
This commit was generated by cvs2svn to track changes on a CVS vendor
[thirdparty/binutils-gdb.git] / sim / ppc / Makefile.in
1 #
2 # This file is part of the program psim.
3 #
4 # Copyright (C) 1994-1996, 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 default: all
22
23 VPATH = @srcdir@
24 srcdir = @srcdir@
25 srcroot = $(srcdir)/../..
26
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29
30 host_alias = @host_alias@
31 target_alias = @target_alias@
32 program_transform_name = @program_transform_name@
33 bindir = @bindir@
34 libdir = @libdir@
35 tooldir = $(libdir)/$(target_alias)
36
37 datadir = @datadir@
38 mandir = @mandir@
39 man1dir = $(mandir)/man1
40 man2dir = $(mandir)/man2
41 man3dir = $(mandir)/man3
42 man4dir = $(mandir)/man4
43 man5dir = $(mandir)/man5
44 man6dir = $(mandir)/man6
45 man7dir = $(mandir)/man7
46 man8dir = $(mandir)/man8
47 man9dir = $(mandir)/man9
48 infodir = @infodir@
49 includedir = @includedir@
50
51 SHELL = /bin/sh
52
53 INSTALL = $(srcroot)/install-sh -c
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_DATA = @INSTALL_DATA@
56 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
57 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
58
59 AR = @AR@
60 AR_FLAGS = rc
61 CC = @CC@
62 CFLAGS = @CFLAGS@
63 CC_FOR_BUILD = @CC_FOR_BUILD@
64 BISON = bison
65 MAKEINFO = makeinfo
66 RANLIB = @RANLIB@
67
68 SIM_CFLAGS = @sim_cflags@
69 INLINE_CFLAGS = @sim_inline@
70 BSWAP_CFLAGS = @sim_bswap@
71 ENDIAN_CFLAGS = @sim_endian@
72 REGPARM_CFLAGS = @sim_regparm@
73 STDCALL_CFLAGS = @sim_stdcall@
74 HOSTENDIAN_CFLAGS = @sim_hostendian@
75 SMP_CFLAGS = @sim_smp@
76 XOR_ENDIAN_CFLAGS = @sim_xor_endian@
77 BITSIZE_CFLAGS = @sim_bitsize@
78 HOSTBITSIZE_CFLAGS = @sim_hostbitsize@
79 ENV_CFLAGS = @sim_env@
80 TIMEBASE_CFLAGS = @sim_timebase@
81 ALIGNMENT_CFLAGS = @sim_alignment@
82 FLOAT_CFLAGS = @sim_float@
83 TRACE_CFLAGS = @sim_trace@
84 ASSERT_CFLAGS = @sim_assert@
85 RESERVED_CFLAGS = @sim_reserved@
86 MONITOR_CFLAGS = @sim_monitor@
87 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
88 STDIO_CFLAGS = @sim_stdio@
89 TERMIO_CFLAGS = @sim_termio@
90 WARNING_CFLAGS = @sim_warnings@
91 DEVZERO_CFLAGS = @sim_devzero@
92 CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
93 $(ENDIAN_CFLAGS) \
94 $(REGPARM_CFLAGS) \
95 $(STDCALL_CFLAGS) \
96 $(HOSTENDIAN_CFLAGS) \
97 $(SMP_CFLAGS) \
98 $(XOR_ENDIAN_CFLAGS) \
99 $(BITSIZE_CFLAGS) \
100 $(HOSTBITSIZE_CFLAGS) \
101 $(ENV_CFLAGS) \
102 $(TIMEBASE_CFLAGS) \
103 $(ALIGNMENT_CFLAGS) \
104 $(FLOAT_CFLAGS) \
105 $(TRACE_CFLAGS) \
106 $(ASSERT_CFLAGS) \
107 $(RESERVED_CFLAGS) \
108 $(MONITOR_CFLAGS) \
109 $(MODEL_CFLAGS) \
110 $(STDIO_CFLAGS) \
111 $(TERMIO_CFLAGS) \
112 $(DEVZERO_CFLAGS)
113
114 STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
115 NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
116 BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
117
118 BUILD_LDFLAGS =
119
120 CONFIG_FILE = @sim_config@
121 IGEN_OPCODE_RULES = @sim_opcode@
122 IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
123 IGEN_DUPLICATE = @sim_dup@
124 IGEN_JUMP = @sim_jump@
125 IGEN_FILTER = @sim_filter@
126 IGEN_ICACHE = @sim_icache@
127 IGEN_SMP = @sim_igen_smp@
128 IGEN_LINE_NR = @sim_line_nr@
129 DGEN_FLAGS = @sim_switch@
130
131 HDEFINES = @HDEFINES@
132 TDEFINES =
133 IGEN_FLAGS = \
134 $(IGEN_DECODE_MECHANISM) \
135 $(IGEN_DUPLICATE) \
136 $(IGEN_JUMP) \
137 $(IGEN_FILTER) \
138 $(IGEN_ICACHE) \
139 $(IGEN_SMP) \
140 $(IGEN_LINE_NR)
141
142 .NOEXPORT:
143 MAKEOVERRIDES=
144
145 LIB_INCLUDES = -I$(srcdir)/../../include
146 BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
147 GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
148 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
149
150 LIBIBERTY_LIB = ../../libiberty/libiberty.a
151 BFD_LIB = ../../bfd/libbfd.a
152
153 TARGETLIB = libsim.a
154
155 all: run $(TARGETLIB) $(GDB_OBJ)
156
157 .c.o:
158 $(CC) -c $(STD_CFLAGS) $<
159
160
161
162 BASICS_H = \
163 basics.h \
164 config.h \
165 ppc-config.h \
166 inline.h \
167 sim_callbacks.h \
168 debug.h filter_filename.h \
169 words.h \
170 bits.h \
171 sim-endian.h
172
173 PSIM_H = \
174 psim.h \
175 $(BASICS_H)
176
177 IDECODE_H = \
178 idecode.h \
179 idecode_expression.h \
180 idecode_branch.h \
181 idecode_fields.h \
182 icache.h
183
184 REGISTERS_H = \
185 registers.h \
186 spreg.h
187
188 CPU_H = \
189 cpu.h \
190 $(BASICS_H) \
191 $(REGISTERS_H) \
192 $(IDECODE_H) \
193 device.h \
194 corefile.h \
195 vm.h \
196 events.h \
197 interrupts.h \
198 psim.h \
199 itable.h \
200 mon.h \
201 model.h
202
203 DEVICE_TABLE_H = \
204 $(BASICS_H) \
205 device_table.h \
206 device.h \
207 tree.h \
208 hw.h
209
210 EMUL_GENERIC_H = \
211 $(CPU_H) \
212 $(IDECODE_H) \
213 emul_generic.h \
214 tree.h \
215 os_emul.h
216
217
218 INLINE = \
219 inline.h \
220 inline.c
221
222 BUILT_SRC_WO_CONFIG = \
223 icache.h icache.c \
224 support.h support.c \
225 idecode.h idecode.c \
226 semantics.h semantics.c \
227 itable.h itable.c \
228 spreg.h spreg.c \
229 model.h model.c \
230 support.h support.c \
231 pk.h \
232 hw.h hw.c \
233 filter_host.c \
234 @sim_targ_vals@
235
236 BUILT_SRC = \
237 $(BUILT_SRC_WO_CONFIG) \
238 config.h \
239 ppc-config.h
240
241 LIB_INLINE_SRC = \
242 psim.c \
243 bits.c \
244 debug.c \
245 sim-endian.c \
246 sim-endian.h \
247 sim-endian-n.h \
248 vm.c \
249 vm_n.h \
250 corefile.c \
251 events.c \
252 os_emul.c \
253 registers.c \
254 cpu.c \
255 interrupts.c \
256 device.c \
257 tree.c \
258 device_table.c \
259 cap.c \
260 mon.c \
261 options.c
262
263 LIB_SRC = \
264 $(PACKAGE_SRC) \
265 $(HW_SRC) \
266 $(LIB_INLINE_SRC)
267
268 MAIN_SRC = \
269 main.c \
270 sim_calls.c
271
272
273 # NOTE: semantics, idecode and psim put last so smaller files are compiled
274 # first
275 LIB_OBJ = \
276 debug.o \
277 filter_filename.o \
278 bits.o \
279 sim-endian.o \
280 os_emul.o \
281 emul_generic.o \
282 emul_bugapi.o \
283 emul_chirp.o \
284 emul_netbsd.o \
285 emul_unix.o \
286 registers.o \
287 vm.o \
288 corefile.o \
289 model.o \
290 spreg.o \
291 cpu.o \
292 interrupts.o \
293 events.o \
294 cap.o \
295 device.o \
296 tree.o \
297 device_table.o \
298 itable.o \
299 mon.o \
300 icache.o \
301 semantics.o \
302 idecode.o \
303 support.o \
304 psim.o \
305 $(PACKAGE_OBJ) \
306 $(HW_OBJ) \
307 options.o
308
309
310 GDB_OBJ = sim_calls.o @sim_callback@
311
312 HW_SRC = @sim_hw_src@
313 HW_OBJ = @sim_hw_obj@
314
315 PACKAGE_SRC = @sim_pk_src@
316 PACKAGE_OBJ = @sim_pk_obj@
317
318
319 psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS)
320 $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim main.o $(TARGETLIB) $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
321
322 run: psim
323 rm -f run
324 ln psim run
325
326 $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
327 rm -f $(TARGETLIB)
328 $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
329 $(RANLIB) $(TARGETLIB)
330
331 psim.o: psim.c psim.h tree.h $(CPU_H) $(IDECODE_H)
332
333 bits.o: bits.c $(BASICS_H)
334
335 debug.o: debug.c $(BASICS_H)
336 filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h
337
338 sim-endian.o: sim-endian.c sim-endian-n.h $(BASICS_H)
339
340 os_emul.o: os_emul.c emul_netbsd.h emul_unix.h emul_chirp.h emul_bugapi.h $(EMUL_GENERIC_H)
341 emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
342
343 emul_bugapi.o: emul_bugapi.c emul_bugapi.h $(EMUL_GENERIC_H)
344 emul_chirp.o: emul_chirp.c emul_chirp.h $(EMUL_GENERIC_H)
345 emul_netbsd.o: emul_netbsd.c emul_netbsd.h $(EMUL_GENERIC_H)
346 emul_unix.o: emul_unix.c emul_unix.h $(EMUL_GENERIC_H)
347
348 registers.o: registers.c $(REGISTERS_H) $(BASICS_H)
349
350 cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
351
352 interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
353
354 # Given that inlines are turned on now, rebuild idecode whenever
355 # anything changes.
356 idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h $(LIB_INLINE_SRC) $(BUILT_SRC)
357 $(CC) -c $(NOWARN_CFLAGS) $<
358
359 # double.o: double.c dp-bit.c
360
361 vm.o: vm.c vm.h vm_n.h $(CPU_H)
362
363 corefile.o: corefile.c corefile.h corefile-n.h $(BASICS_H) $(DEVICE_TABLE_H)
364
365 model.o: model.c $(CPU_H)
366
367 events.o: events.c events.h $(BASICS_H)
368
369 sim_calls.o: sim_calls.c $(PSIM_H) itable.h ../../gdb/tm.h options.h
370
371 spreg.o: spreg.c spreg.h spreg.c $(BASICS_H)
372
373 main.o: main.c $(PSIM_H) itable.h options.h
374
375 device.o: device.c $(DEVICE_TABLE_H) cap.h
376
377 tree.o: tree.c tree.h device.h $(DEVICE_TABLE_H)
378
379 device_table.o: device_table.c $(DEVICE_TABLE_H) events.h hw.c
380
381 cap.o: cap.c cap.h $(BASICS_H)
382
383 semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
384 $(CC) -c $(NOWARN_CFLAGS) $<
385
386 icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
387 $(CC) -c $(NOWARN_CFLAGS) $<
388
389 support.o: support.c support.h $(IDECODE_H) $(CPU_H)
390
391 itable.o: itable.c itable.h
392
393 mon.o: mon.c $(CPU_H)
394
395 # GDB after 4.16 expects the default_callback structure to be setup.
396 # As a kludge, build the common stuff here for now.
397 gentmap: ../common/gentmap.c Makefile targ-vals.def
398 $(CC_FOR_BUILD) $(BUILD_FLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS)
399
400 targ-vals.def: $(srcdir)/../common/nltvals.def
401 rm -f targ-vals.def tmp-def
402 cat $(srcdir)/../common/nltvals.def > tmp-vals.def
403 $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
404
405 targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change
406 rm -f tmp-vals.h
407 ./gentmap -h > tmp-vals.h
408 $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
409
410 targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
411 rm -f tmp-map.c
412 ./gentmap -c > tmp-map.c
413 $(srcdir)/../../move-if-change tmp-map.c targ-map.c
414
415 callback.o: ../common/callback.c targ-vals.h config.h
416 $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
417
418 targ-map.o: targ-map.c targ-vals.h
419
420 # Rebuild options whenever something changes so the date/time is up to date.
421 options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
422 $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
423
424 tmp-defines: config.h Makefile
425 sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
426 $(srcdir)/../../move-if-change tmp-defines.h defines.h
427 touch tmp-defines
428
429 #
430 # Rules to create the built c source code files
431 #
432
433 ppc-config.h: $(CONFIG_FILE)
434 cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
435
436
437 tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
438 ./dgen $(DGEN_FLAGS) \
439 -r $(srcdir)/ppc-spr-table \
440 -n spreg.h -hp tmp-spreg.h \
441 -n spreg.c -p tmp-spreg.c
442 $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
443 $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
444 touch tmp-dgen
445
446
447 tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) ppc-cache-rules $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
448 ./igen $(IGEN_FLAGS) \
449 -o $(srcdir)/$(IGEN_OPCODE_RULES) \
450 -k $(srcdir)/ppc-cache-rules \
451 -i $(srcdir)/ppc-instructions \
452 -n icache.h -hc tmp-icache.h \
453 -n icache.c -c tmp-icache.c \
454 -n semantics.h -hs tmp-semantics.h \
455 -n semantics.c -s tmp-semantics.c \
456 -n idecode.h -hd tmp-idecode.h \
457 -n idecode.c -d tmp-idecode.c \
458 -n itable.h -ht tmp-itable.h \
459 -n itable.c -t tmp-itable.c \
460 -n model.h -hm tmp-model.h \
461 -n model.c -m tmp-model.c \
462 -n support.h -hf tmp-support.h \
463 -n support.c -f tmp-support.c
464 $(srcdir)/../../move-if-change tmp-icache.h icache.h
465 $(srcdir)/../../move-if-change tmp-icache.c icache.c
466 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
467 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
468 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
469 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
470 $(srcdir)/../../move-if-change tmp-itable.h itable.h
471 $(srcdir)/../../move-if-change tmp-itable.c itable.c
472 $(srcdir)/../../move-if-change tmp-model.h model.h
473 $(srcdir)/../../move-if-change tmp-model.c model.c
474 $(srcdir)/../../move-if-change tmp-support.h support.h
475 $(srcdir)/../../move-if-change tmp-support.c support.c
476 touch tmp-igen
477
478 # NOTE: Some versions of make don't handle files created as side-effects
479 # uncomment the below if that is the case.
480
481 $(TARGETLIB): tmp-igen tmp-dgen
482 itable.h itable.c icache.h icache.c idecode.h idecode.c semantics.h semantics.c model.h model.c support.h support.c: tmp-igen
483 spreg.h spreg.c: tmp-dgen
484
485 dgen: dgen.o table.o lf.o misc.o filter_host.o
486 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o $(BUILD_LIBS)
487
488 igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o
489 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o $(BUILD_LIBS)
490
491 filter_host.c: filter_filename.c
492 cat $(srcdir)/filter_filename.c > filter_host.c
493
494 filter_host.o: filter_host.c filter_filename.h config.h ppc-config.h
495 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
496
497 table.o: table.c misc.h filter_filename.h lf.h table.h
498 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
499
500 lf.o: lf.c misc.h filter_filename.h lf.h
501 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
502
503 filter.o: filter.c misc.h lf.h table.h filter.h
504 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
505 tmp-filter: filter.c misc.h misc.o
506 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
507
508 ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h
509 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
510 tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
511 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
512
513 ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h
514 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
515 tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
516 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
517
518 ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
519 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
520 tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
521 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
522
523 gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
524 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
525
526 gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
527 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
528
529 gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
530 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
531
532 gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h igen.h ld-insn.h
533 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
534
535 gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h igen.h ld-insn.h
536 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
537
538 gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h igen.h ld-insn.h
539 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
540
541 dgen.o: dgen.c misc.h filter_filename.h lf.h table.h
542 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
543
544 igen.o: igen.c misc.h filter_filename.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-semantics.h gen-support.h igen.h
545 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
546
547 misc.o: misc.c misc.h filter_filename.h
548 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
549
550
551
552 # real hardware
553 tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
554 # The first for loop is to remove duplicates.
555 f=""; \
556 for i in $(HW_SRC) ; do \
557 case " $$f " in \
558 *" $$i "*) ;; \
559 *) f="$$f $$i" ;; \
560 esac ; \
561 done ; \
562 for hw in $$f ; do echo $$hw ; done \
563 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
564 -e 's/^/extern const device_descriptor /' \
565 -e 's/$$/_device_descriptor\[\];/' \
566 > tmp-hw.h
567 f=""; \
568 for i in $(HW_SRC) ; do \
569 case " $$f " in \
570 *" $$i "*) ;; \
571 *) f="$$f $$i" ;; \
572 esac ; \
573 done ; \
574 for hw in $$f ; do echo $$hw ; done \
575 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
576 -e 's/^/ /' \
577 -e 's/$$/_device_descriptor,/' \
578 > tmp-hw.c
579 $(srcdir)/../../move-if-change tmp-hw.h hw.h
580 $(srcdir)/../../move-if-change tmp-hw.c hw.c
581 touch tmp-hw
582
583 hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H)
584 hw_core.o: hw_core.c $(DEVICE_TABLE_H)
585 hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) pk.h
586 hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
587 hw_htab.o: hw_htab.c $(DEVICE_TABLE_H)
588 hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
589 hw_init.o: hw_init.c $(DEVICE_TABLE_H)
590 hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
591 hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
592 hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
593 hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
594 hw_pal.o: hw_pal.c $(DEVICE_TABLE_H)
595 hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) hw_phb.h
596 hw_register.o: hw_register.c $(DEVICE_TABLE_H)
597 hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
598 hw_vm.o: hw_vm.c $(DEVICE_TABLE_H)
599 # ignore this line, it stops make from getting confused
600
601
602
603 # real packages
604 tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
605 # The first for loop is to remove duplicates.
606 f=""; \
607 for i in $(PACKAGE_SRC) ; do \
608 case " $$f " in \
609 *" $$i "*) ;; \
610 *) f="$$f $$i" ;; \
611 esac ; \
612 done ; \
613 for pk in $$f ; do echo $$pk ; done \
614 | sed -e 's/^.*pk_\(.*\)\.c/\1/' \
615 -e 's/^/extern package_create_instance_callback pk_/' \
616 -e 's/$$/_create_instance;/' \
617 > tmp-pk.h
618 $(srcdir)/../../move-if-change tmp-pk.h pk.h
619 touch tmp-pk
620
621 pk_disklabel.o: pk.h $(DEVICE_TABLE_H)
622 # ignore this line, it stops make from getting confused
623
624
625
626 tags etags: TAGS
627
628 TAGS: $(BUILT_SRC)
629 etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
630
631 clean mostlyclean:
632 rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG) gentmap
633
634 distclean realclean: clean
635 rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
636
637 maintainer-clean: distclean
638 rm -f *~ *.log ppc-config.h core *.core
639
640 Makefile: Makefile.in config.status
641 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
642
643 config.h: stamp-h ; @true
644 stamp-h: config.in config.status
645 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
646
647 config.status: configure
648 $(SHELL) ./config.status --recheck
649
650 install:
651 $(INSTALL_XFORM) run $(bindir)/run
652