Remove path name from test case
[binutils-gdb.git] / sim / ppc / Makefile.in
1 #
2 # This file is part of the program psim.
3 #
4 # Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
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 3 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, see <http://www.gnu.org/licenses/>.
18 #
19
20 default: all
21
22 VPATH = @srcdir@
23 srcdir = @srcdir@
24 srccom = $(srcdir)/../common
25 srcroot = $(srcdir)/../..
26 srcsim = $(srcdir)/..
27
28 include $(srcroot)/gdb/silent-rules.mk
29
30 # Helper code from gnulib.
31 GNULIB_PARENT_DIR = ../..
32 include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
33
34 # Settings from top-level configure.
35 include ../arch-subdir.mk
36
37 prefix = @prefix@
38 exec_prefix = @exec_prefix@
39
40 datarootdir = @datarootdir@
41 datadir = @datadir@
42 mandir = @mandir@
43 man1dir = $(mandir)/man1
44 man2dir = $(mandir)/man2
45 man3dir = $(mandir)/man3
46 man4dir = $(mandir)/man4
47 man5dir = $(mandir)/man5
48 man6dir = $(mandir)/man6
49 man7dir = $(mandir)/man7
50 man8dir = $(mandir)/man8
51 man9dir = $(mandir)/man9
52 infodir = @infodir@
53 includedir = @includedir@
54
55 # This can be referenced by the gettext configuration code.
56 top_builddir = ..
57
58 SHELL = /bin/sh
59
60 BISON = bison
61 MAKEINFO = makeinfo
62
63 INLINE_CFLAGS = $(SIM_INLINE)
64 SMP_CFLAGS = @sim_smp@
65 XOR_ENDIAN_CFLAGS = @sim_xor_endian@
66 BITSIZE_CFLAGS = @sim_bitsize@
67 HOSTBITSIZE_CFLAGS = @sim_hostbitsize@
68 TIMEBASE_CFLAGS = @sim_timebase@
69 FLOAT_CFLAGS = @sim_float@
70 MONITOR_CFLAGS = @sim_monitor@
71 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
72 TERMIO_CFLAGS = @sim_termio@
73 SWITCH_CFLAGS = @sim_switch@
74 CONFIG_CFLAGS = \
75 $(SMP_CFLAGS) \
76 $(XOR_ENDIAN_CFLAGS) \
77 $(BITSIZE_CFLAGS) \
78 $(HOSTBITSIZE_CFLAGS) \
79 $(TIMEBASE_CFLAGS) \
80 $(FLOAT_CFLAGS) \
81 $(MONITOR_CFLAGS) \
82 $(MODEL_CFLAGS) \
83 $(TERMIO_CFLAGS) \
84 $(SWITCH_CFLAGS)
85 SIM_FPU_CFLAGS = -DHAVE_COMMON_FPU -I../common -I${srcdir}/../common
86
87 STD_CFLAGS = $(CFLAGS) $(WERROR_CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(INCGNU) $(SIM_FPU_CFLAGS)
88 NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(INCLUDES) $(SIM_FPU_CFLAGS)
89 BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARN_CFLAGS)
90
91 LIBS = $(COMMON_LIBS) @LIBS@ $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
92
93 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
94 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
95
96 IGEN_OPCODE_RULES = @sim_opcode@
97 IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
98 IGEN_DUPLICATE = @sim_dup@
99 IGEN_JUMP = @sim_jump@
100 IGEN_FILTER = @sim_filter@
101 IGEN_ICACHE = @sim_icache@
102 IGEN_SMP = @sim_igen_smp@
103 IGEN_LINE_NR = @sim_line_nr@
104
105 IGEN_FLAGS = \
106 $(IGEN_DECODE_MECHANISM) \
107 $(IGEN_DUPLICATE) \
108 $(IGEN_JUMP) \
109 $(IGEN_FILTER) \
110 $(IGEN_ICACHE) \
111 $(IGEN_SMP) \
112 $(IGEN_LINE_NR)
113
114 # igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable
115 # leak detection while running it.
116
117 IGEN = ASAN_OPTIONS=detect_leaks=0 ./igen
118
119 .NOEXPORT:
120 MAKEOVERRIDES=
121
122 LIB_INCLUDES = -I$(srcdir)/../../include
123 BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
124 GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
125
126 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) -I../..
127
128 LIBIBERTY_LIB = ../../libiberty/libiberty.a
129 BFD_LIB = ../../bfd/libbfd.la
130
131
132 TARGETLIB = libsim.a
133
134 all: main.o $(TARGETLIB) $(GDB_OBJ)
135
136 .c.o:
137 $(ECHO_CC) $(CC) -c $(STD_CFLAGS) $<
138
139
140 # Headers outside sim/ppc.
141 ANSIDECL_H = $(srcroot)/include/ansidecl.h
142 BFD_H = ../../bfd/bfd.h
143 GDB_CALLBACK_H = $(srcroot)/include/sim/callback.h
144 GDB_REMOTE_SIM_H = $(srcroot)/include/sim/sim.h
145 GDB_SIM_PPC_H = $(srcroot)/include/sim/sim-ppc.h
146 COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h
147 COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h
148 COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h
149 COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
150 COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
151
152 # Headers in sim/ppc.
153 ACCONFIG_H = \
154 acconfig.h
155
156 ALTIVEC_EXPRESSION_H = \
157 altivec_expression.h
158
159 ALTIVEC_REGISTERS_H = \
160 altivec_registers.h
161
162 BASICS_H = \
163 basics.h \
164 $(CONFIG_H) \
165 $(INLINE_H) \
166 $(SIM_CALLBACKS_H) \
167 $(DEBUG_H) \
168 $(WORDS_H) \
169 $(BITS_H) \
170 $(SIM_ENDIAN_H)
171
172 BITS_H = \
173 bits.h \
174 bits.c
175
176 CAP_H = \
177 cap.h \
178 $(BASICS_H)
179
180 COREFILE_H = \
181 corefile.h
182
183 COREFILE_N_H = \
184 corefile-n.h
185
186 CPU_H = \
187 cpu.h \
188 $(BASICS_H) \
189 $(REGISTERS_H) \
190 $(DEVICE_H) \
191 $(COREFILE_H) \
192 $(VM_H) \
193 $(EVENTS_H) \
194 $(INTERRUPTS_H) \
195 $(PSIM_H) \
196 $(IDECODE_H) \
197 $(ITABLE_H) \
198 $(OS_EMUL_H) \
199 $(MON_H) \
200 $(MODEL_H) \
201 cpu.c
202
203 DEBUG_H = \
204 debug.h \
205 $(FILTER_FILENAME_H)
206
207 DEVICE_H = \
208 device.h
209
210 DEVICE_TABLE_H = \
211 device_table.h \
212 $(BASICS_H) \
213 $(DEVICE_H) \
214 $(TREE_H) \
215 $(HW_H)
216
217 E500_EXPRESSION_H = \
218 e500_expression.h
219
220 E500_REGISTERS_H = \
221 e500_registers.h
222
223 EMUL_BUGAPI_H = \
224 emul_bugapi.h
225
226 EMUL_CHIRP_H = \
227 emul_chirp.h
228
229 EMUL_GENERIC_H = \
230 emul_generic.h \
231 $(CPU_H) \
232 $(IDECODE_H) \
233 $(OS_EMUL_H) \
234 $(TREE_H) \
235 $(BFD_H)
236
237 EMUL_NETBSD_H = \
238 emul_netbsd.h
239
240 EMUL_UNIX_H = \
241 emul_unix.h
242
243 EVENTS_H = \
244 events.h
245
246 FILTER_FILENAME_H = \
247 filter_filename.h
248
249 FILTER_H = \
250 filter.h
251
252 GEN_ICACHE_H = \
253 gen-icache.h
254
255 GEN_IDECODE_H = \
256 gen-idecode.h
257
258 GEN_ITABLE_H = \
259 gen-itable.h
260
261 GEN_MODEL_H = \
262 gen-model.h
263
264 GEN_SEMANTICS_H = \
265 gen-semantics.h
266
267 GEN_SUPPORT_H = \
268 gen-support.h
269
270 HW_CPU_H = \
271 hw_cpu.h
272
273 HW_PHB_H = \
274 hw_phb.h
275
276 IDECODE_BRANCH_H = \
277 idecode_branch.h
278
279 IDECODE_EXPRESSION_H = \
280 idecode_expression.h \
281 $(ALTIVEC_EXPRESSION_H) \
282 $(E500_EXPRESSION_H)
283
284 IDECODE_FIELDS_H = \
285 idecode_fields.h
286
287 IGEN_H = \
288 igen.h
289
290 INLINE_H = \
291 inline.h
292
293 INTERRUPTS_H = \
294 interrupts.h
295
296 LD_CACHE_H = \
297 ld-cache.h
298
299 LD_DECODE_H = \
300 ld-decode.h
301
302 LD_INSN_H = \
303 ld-insn.h
304
305 LF_H = \
306 lf.h
307
308 MISC_H = \
309 misc.h \
310 $(CONFIG_H) \
311 $(FILTER_FILENAME_H)
312
313 MON_H = \
314 mon.h \
315 $(BASICS_H) \
316 $(ITABLE_H)
317
318 OPTIONS_H = \
319 options.h
320
321 OS_EMUL_H = \
322 os_emul.h
323
324 PSIM_H = \
325 psim.h \
326 $(BASICS_H)
327
328 REGISTERS_H = \
329 registers.h \
330 $(E500_REGISTERS_H) \
331 $(ALTIVEC_REGISTERS_H) \
332 $(SPREG_H)
333
334 SIM_CALLBACKS_H = \
335 sim_callbacks.h
336
337 SIM_ENDIAN_H = \
338 sim-endian.h \
339 sim-endian.c
340
341 SIM_ENDIAN_N_H = \
342 sim-endian-n.h
343
344 SIM_MAIN_H = \
345 sim-main.h \
346 $(COMMON_SIM_BASICS_H) \
347 $(COMMON_SIM_SIGNAL_H) \
348 $(COMMON_SIM_BASE_H)
349
350 STD_CONFIG_H = \
351 std-config.h
352
353 TABLE_H = \
354 table.h
355
356 TREE_H = \
357 tree.h
358
359 VM_H = \
360 vm.h
361
362 VM_N_H = \
363 vm_n.h
364
365 WORDS_H = \
366 words.h
367
368
369 # Generated headers.
370 CONFIG_H = \
371 config.h
372
373 DEFINES_H = \
374 defines.h
375
376 HW_H = \
377 hw.h
378
379 ICACHE_H = \
380 icache.h
381
382 IDECODE_H = \
383 idecode.h \
384 $(IDECODE_EXPRESSION_H) \
385 $(IDECODE_FIELDS_H) \
386 $(IDECODE_BRANCH_H)
387
388 ITABLE_H = \
389 itable.h
390
391 MODEL_H = \
392 model.h
393
394 PK_H = \
395 pk.h
396
397 SEMANTICS_H = \
398 semantics.h
399
400 SPREG_H = \
401 spreg.h
402
403 SUPPORT_H = \
404 support.h \
405 support.c
406
407 INLINE = \
408 inline.h \
409 inline.c
410
411 BUILT_SRC_WO_CONFIG = \
412 icache.h icache.c \
413 support.h support.c \
414 idecode.h idecode.c \
415 semantics.h semantics.c \
416 itable.h itable.c \
417 model.h model.c \
418 support.h support.c \
419 pk.h \
420 hw.h hw.c \
421 filter_host.c
422
423 BUILT_SRC = \
424 $(BUILT_SRC_WO_CONFIG) \
425 config.h
426
427 LIB_INLINE_SRC = \
428 psim.c \
429 bits.c \
430 debug.c \
431 sim-endian.c \
432 sim-endian.h \
433 sim-endian-n.h \
434 vm.c \
435 vm_n.h \
436 corefile.c \
437 events.c \
438 os_emul.c \
439 registers.c \
440 cpu.c \
441 interrupts.c \
442 device.c \
443 tree.c \
444 device_table.c \
445 cap.c \
446 mon.c \
447 options.c
448
449 LIB_SRC = \
450 $(PACKAGE_SRC) \
451 $(HW_SRC) \
452 $(LIB_INLINE_SRC)
453
454 MAIN_SRC = \
455 main.c \
456 gdb-sim.c \
457 sim_calls.c
458
459 COMMON_OBJS_NAMES = \
460 callback.o \
461 target-newlib-errno.o \
462 target-newlib-open.o \
463 target-newlib-signal.o \
464 target-newlib-syscall.o \
465 version.o
466 COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/%)
467
468 # NOTE: semantics, idecode and psim put last so smaller files are compiled
469 # first
470 LIB_OBJ = \
471 debug.o \
472 filter_filename.o \
473 bits.o \
474 sim-endian.o \
475 os_emul.o \
476 emul_generic.o \
477 emul_bugapi.o \
478 emul_chirp.o \
479 emul_netbsd.o \
480 emul_unix.o \
481 registers.o \
482 vm.o \
483 corefile.o \
484 model.o \
485 spreg.o \
486 cpu.o \
487 interrupts.o \
488 events.o \
489 cap.o \
490 device.o \
491 tree.o \
492 device_table.o \
493 itable.o \
494 mon.o \
495 icache.o \
496 semantics.o \
497 idecode.o \
498 support.o \
499 sim-fpu.o \
500 psim.o \
501 $(COMMON_OBJS) \
502 $(PACKAGE_OBJ) \
503 $(HW_OBJ) \
504 options.o
505
506
507 GDB_OBJ = gdb-sim.o sim_calls.o
508
509 HW_SRC = @sim_hw_src@
510 HW_OBJ = @sim_hw_obj@
511
512 PACKAGE_SRC = pk_disklabel.c
513 PACKAGE_OBJ = $(PACKAGE_SRC:.c=.o)
514
515
516 $(TARGETLIB): tmp-igen tmp-hw tmp-defines $(LIB_OBJ) $(GDB_OBJ)
517 $(ECHO_AR) $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
518 $(ECHO_RANLIB) $(RANLIB) $(TARGETLIB)
519
520 psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
521
522 bits.o: bits.c $(BASICS_H)
523
524 debug.o: debug.c $(CONFIG_H) $(BASICS_H)
525 filter_filename.o: filter_filename.c $(CONFIG_H) $(FILTER_FILENAME_H)
526
527 sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
528
529 os_emul.o: os_emul.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) $(EMUL_UNIX_H) $(EMUL_CHIRP_H) $(EMUL_BUGAPI_H)
530 emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
531
532 emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H)
533 emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H)
534 emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H)
535 emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H)
536
537 registers.o: registers.c $(BASICS_H) $(REGISTERS_H)
538
539 cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
540
541 interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H)
542
543 # Given that inlines are turned on now, rebuild idecode whenever
544 # anything changes.
545 idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC)
546
547 # double.o: double.c dp-bit.c
548
549 vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H)
550
551 corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H)
552
553 model.o: model.c $(CPU_H) $(MON_H)
554
555 events.o: events.c $(BASICS_H) $(EVENTS_H)
556
557 sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
558
559 gdb-sim.o: gdb-sim.c $(PSIM_H) $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H) $(GDB_SIM_PPC_H) $(SIM_CALLBACK_H)
560
561 spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
562
563 main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
564
565 device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
566
567 tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
568
569 device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c
570
571 cap.o: cap.c $(CAP_H)
572
573 semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
574
575 icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
576
577 support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
578
579 itable.o: itable.c $(ITABLE_H)
580
581 mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
582
583 sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H)
584 $(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
585
586 # Rebuild options whenever something changes so the date/time is up to date.
587 options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
588 $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
589
590 defines.h: tmp-defines; @true
591 tmp-defines: config.h Makefile
592 $(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
593 $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-defines.h defines.h
594 $(SILENCE) touch $@
595
596 #
597 # Rules to create the built c source code files
598 #
599
600 tmp-igen: igen $(srcdir)/powerpc.igen $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcroot)/move-if-change
601 $(ECHO_GEN) $(IGEN) $(IGEN_FLAGS) \
602 -o $(srcdir)/$(IGEN_OPCODE_RULES) \
603 -I $(srcdir) -i $(srcdir)/powerpc.igen \
604 -n icache.h -hc icache.h \
605 -n icache.c -c icache.c \
606 -n semantics.h -hs semantics.h \
607 -n semantics.c -s semantics.c \
608 -n idecode.h -hd idecode.h \
609 -n idecode.c -d idecode.c \
610 -n itable.h -ht itable.h \
611 -n itable.c -t itable.c \
612 -n model.h -hm model.h \
613 -n model.c -m model.c \
614 -n support.h -hf support.h \
615 -n support.c -f support.c
616 $(SILENCE) touch $@
617
618 # NOTE: Some versions of make don't handle files created as side-effects
619 # uncomment the below if that is the case.
620
621 $(TARGETLIB): tmp-igen
622 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
623
624 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
625 $(ECHO_CCLD) $(LINK_FOR_BUILD) 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
626
627 filter_host.c: filter_filename.c
628 $(ECHO_GEN) cat $(srcdir)/filter_filename.c > filter_host.c
629
630 filter_host.o: filter_host.c $(CONFIG_H) $(FILTER_FILENAME_H)
631 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c filter_host.c
632
633 table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
634 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/table.c
635
636 lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
637 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/lf.c
638
639 filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
640 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/filter.c
641 tmp-filter: filter.c $(MISC_H) misc.o
642 $(ECHO_CCLD) $(LINK_FOR_BUILD) -DMAIN $(srcdir)/filter.c misc.o
643
644 ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
645 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-decode.c
646 tmp-ld-decode: ld-decode.c misc.o lf.o table.o filter_host.o
647 $(ECHO_CCLD) $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o
648
649 ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
650 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-cache.c
651 tmp-ld-cache: ld-cache.c misc.o lf.o table.o filter_host.o
652 $(ECHO_CCLD) $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o
653
654 ld-insn.o: ld-insn.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H)
655 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-insn.c
656 tmp-ld-insn: ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
657 $(ECHO_CCLD) $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
658
659 gen-model.o: gen-model.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(GEN_MODEL_H)
660 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-model.c
661
662 gen-itable.o: gen-itable.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_ITABLE_H)
663 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-itable.c
664
665 gen-icache.o: gen-icache.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H)
666 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-icache.c
667
668 gen-semantics.o: gen-semantics.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_ICACHE_H) $(GEN_IDECODE_H)
669 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-semantics.c
670
671 gen-idecode.o: gen-idecode.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H) $(GEN_SEMANTICS_H)
672 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-idecode.c
673
674 gen-support.o: gen-support.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
675 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-support.c
676
677 igen.o: igen.c $(MISC_H) $(LF_H) $(TABLE_H) $(CONFIG_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_MODEL_H) $(GEN_ICACHE_H) $(GEN_ITABLE_H) $(GEN_IDECODE_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
678 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/igen.c
679
680 misc.o: misc.c $(CONFIG_H) $(MISC_H)
681 $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/misc.c
682
683
684
685 # real hardware
686 hw.c hw.h: tmp-hw; @true
687 tmp-hw: Makefile $(HW_SRC) $(srcroot)/move-if-change
688 $(ECHO_GEN)# The first for loop is to remove duplicates.
689 $(SILENCE) f=""; \
690 for i in $(HW_SRC) ; do \
691 case " $$f " in \
692 *" $$i "*) ;; \
693 *) f="$$f $$i" ;; \
694 esac ; \
695 done ; \
696 for hw in $$f ; do echo $$hw ; done \
697 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
698 -e 's/^/extern const device_descriptor /' \
699 -e 's/$$/_device_descriptor\[\];/' \
700 > tmp-hw.h
701 $(SILENCE) f=""; \
702 for i in $(HW_SRC) ; do \
703 case " $$f " in \
704 *" $$i "*) ;; \
705 *) f="$$f $$i" ;; \
706 esac ; \
707 done ; \
708 for hw in $$f ; do echo $$hw ; done \
709 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
710 -e 's/^/ /' \
711 -e 's/$$/_device_descriptor,/' \
712 > tmp-hw.c
713 $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-hw.h hw.h
714 $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-hw.c hw.c
715 $(SILENCE) touch $@
716
717 hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H)
718 hw_com.o: hw_com.c $(DEVICE_TABLE_H)
719 hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H)
720 hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H)
721 hw_eeprom.o: hw_eeprom.c $(DEVICE_TABLE_H)
722 hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
723 hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H)
724 hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
725 hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H)
726 hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
727 hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
728 hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
729 hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
730 hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H)
731 hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H)
732 hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H)
733 hw_sem.o: hw_sem.c $(DEVICE_TABLE_H) $(PSIM_H)
734 hw_shm.o: hw_shm.c $(DEVICE_TABLE_H) $(PSIM_H)
735 hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
736 hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H)
737 # ignore this line, it stops make from getting confused
738
739
740
741 # real packages
742 $(srcdir)/pk.h: $(MAINT) tmp-pk
743 @true
744 tmp-pk: $(srcdir)/Makefile.in $(PACKAGE_SRC) $(srcroot)/move-if-change
745 $(ECHO_GEN)# The first for loop is to remove duplicates.
746 $(SILENCE) echo "/* Generated file by Makefile.in; do not edit. */" > tmp-pk.h; \
747 f=""; \
748 for i in $(PACKAGE_SRC) ; do \
749 case " $$f " in \
750 *" $$i "*) ;; \
751 *) f="$$f $$i" ;; \
752 esac ; \
753 done ; \
754 for pk in $$f ; do echo $$pk ; done \
755 | sed -e 's/^.*pk_\(.*\)\.c/\1/' \
756 -e 's/^/extern package_create_instance_callback pk_/' \
757 -e 's/$$/_create_instance;/' \
758 >> tmp-pk.h
759 $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-pk.h $(srcdir)/pk.h
760 $(SILENCE) touch $@
761
762 pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H)
763 # ignore this line, it stops make from getting confused
764
765
766
767 tags etags: TAGS
768
769 TAGS: $(BUILT_SRC)
770 etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
771
772 clean mostlyclean:
773 rm -f tmp-* *.[oasi] core igen $(BUILT_SRC_WO_CONFIG)
774
775 distclean realclean: clean
776 rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
777
778 maintainer-clean: distclean
779 rm -f *~ *.log core *.core
780
781 Makefile: Makefile.in config.status
782 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
783
784 config.h: stamp-h ; @true
785 stamp-h: config.in config.status
786 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
787
788 config.status: configure
789 $(SHELL) ./config.status --recheck
790
791 check:
792
793 html:
794 clean-html:
795 install-html:
796
797 info:
798 clean-info:
799 install-info:
800
801 pdf:
802 clean-pdf:
803 install-pdf:
804
805 install:
806 installdirs:
807 uninstall: