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