Commit | Line | Data |
---|---|---|
c906108c SS |
1 | # |
2 | # This file is part of the program psim. | |
3 | # | |
8d64d0fd | 4 | # Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney |
c906108c SS |
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 | |
3fd725ef | 8 | # the Free Software Foundation; either version 3 of the License, or |
c906108c SS |
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 | |
51b318de | 17 | # along with this program; if not, see <http://www.gnu.org/licenses/>. |
c906108c SS |
18 | # |
19 | ||
20 | default: all | |
21 | ||
22 | VPATH = @srcdir@ | |
23 | srcdir = @srcdir@ | |
b652c496 | 24 | srccom = $(srcdir)/../common |
c906108c | 25 | srcroot = $(srcdir)/../.. |
490e58e2 | 26 | srcsim = $(srcdir)/.. |
c906108c SS |
27 | |
28 | prefix = @prefix@ | |
29 | exec_prefix = @exec_prefix@ | |
30 | ||
31 | host_alias = @host_alias@ | |
32 | target_alias = @target_alias@ | |
33 | program_transform_name = @program_transform_name@ | |
34 | bindir = @bindir@ | |
35 | libdir = @libdir@ | |
36 | tooldir = $(libdir)/$(target_alias) | |
37 | ||
96e946ca | 38 | datarootdir = @datarootdir@ |
c906108c SS |
39 | datadir = @datadir@ |
40 | mandir = @mandir@ | |
41 | man1dir = $(mandir)/man1 | |
42 | man2dir = $(mandir)/man2 | |
43 | man3dir = $(mandir)/man3 | |
44 | man4dir = $(mandir)/man4 | |
45 | man5dir = $(mandir)/man5 | |
46 | man6dir = $(mandir)/man6 | |
47 | man7dir = $(mandir)/man7 | |
48 | man8dir = $(mandir)/man8 | |
49 | man9dir = $(mandir)/man9 | |
50 | infodir = @infodir@ | |
51 | includedir = @includedir@ | |
52 | ||
53 | # This can be referenced by the gettext configuration code. | |
54 | top_builddir = .. | |
55 | ||
56 | EXEEXT = @EXEEXT@ | |
57 | SHELL = /bin/sh | |
58 | ||
59 | INSTALL = @INSTALL@ | |
60 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
61 | INSTALL_DATA = @INSTALL_DATA@ | |
62 | ||
63 | AR = @AR@ | |
64 | AR_FLAGS = rc | |
65 | CC = @CC@ | |
66 | CFLAGS = @CFLAGS@ | |
67 | CC_FOR_BUILD = @CC_FOR_BUILD@ | |
4b164edf | 68 | CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ |
c906108c SS |
69 | BISON = bison |
70 | MAKEINFO = makeinfo | |
71 | RANLIB = @RANLIB@ | |
72 | ||
73 | SIM_CFLAGS = @sim_cflags@ | |
74 | INLINE_CFLAGS = @sim_inline@ | |
c906108c SS |
75 | ENDIAN_CFLAGS = @sim_endian@ |
76 | REGPARM_CFLAGS = @sim_regparm@ | |
77 | STDCALL_CFLAGS = @sim_stdcall@ | |
78 | HOSTENDIAN_CFLAGS = @sim_hostendian@ | |
79 | SMP_CFLAGS = @sim_smp@ | |
80 | XOR_ENDIAN_CFLAGS = @sim_xor_endian@ | |
81 | BITSIZE_CFLAGS = @sim_bitsize@ | |
82 | HOSTBITSIZE_CFLAGS = @sim_hostbitsize@ | |
83 | ENV_CFLAGS = @sim_env@ | |
84 | TIMEBASE_CFLAGS = @sim_timebase@ | |
85 | ALIGNMENT_CFLAGS = @sim_alignment@ | |
86 | FLOAT_CFLAGS = @sim_float@ | |
87 | TRACE_CFLAGS = @sim_trace@ | |
88 | ASSERT_CFLAGS = @sim_assert@ | |
89 | RESERVED_CFLAGS = @sim_reserved@ | |
90 | MONITOR_CFLAGS = @sim_monitor@ | |
91 | MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@ | |
92 | STDIO_CFLAGS = @sim_stdio@ | |
93 | TERMIO_CFLAGS = @sim_termio@ | |
94 | WARNING_CFLAGS = @sim_warnings@ | |
95 | DEVZERO_CFLAGS = @sim_devzero@ | |
9bbf6f91 | 96 | CONFIG_CFLAGS = \ |
c906108c SS |
97 | $(ENDIAN_CFLAGS) \ |
98 | $(REGPARM_CFLAGS) \ | |
99 | $(STDCALL_CFLAGS) \ | |
100 | $(HOSTENDIAN_CFLAGS) \ | |
101 | $(SMP_CFLAGS) \ | |
102 | $(XOR_ENDIAN_CFLAGS) \ | |
103 | $(BITSIZE_CFLAGS) \ | |
104 | $(HOSTBITSIZE_CFLAGS) \ | |
105 | $(ENV_CFLAGS) \ | |
106 | $(TIMEBASE_CFLAGS) \ | |
107 | $(ALIGNMENT_CFLAGS) \ | |
108 | $(FLOAT_CFLAGS) \ | |
109 | $(TRACE_CFLAGS) \ | |
110 | $(ASSERT_CFLAGS) \ | |
111 | $(RESERVED_CFLAGS) \ | |
112 | $(MONITOR_CFLAGS) \ | |
113 | $(MODEL_CFLAGS) \ | |
114 | $(STDIO_CFLAGS) \ | |
115 | $(TERMIO_CFLAGS) \ | |
116 | $(DEVZERO_CFLAGS) | |
8d64d0fd | 117 | SIM_FPU_CFLAGS = @sim_fpu_cflags@ |
c906108c | 118 | |
bf0275b1 DE |
119 | STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) |
120 | NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) | |
4b164edf | 121 | BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) |
c906108c SS |
122 | |
123 | BUILD_LDFLAGS = | |
35689115 | 124 | LIBS = @LIBS@ |
c906108c SS |
125 | |
126 | CONFIG_FILE = @sim_config@ | |
127 | IGEN_OPCODE_RULES = @sim_opcode@ | |
128 | IGEN_DECODE_MECHANISM = @sim_decode_mechanism@ | |
129 | IGEN_DUPLICATE = @sim_dup@ | |
130 | IGEN_JUMP = @sim_jump@ | |
131 | IGEN_FILTER = @sim_filter@ | |
132 | IGEN_ICACHE = @sim_icache@ | |
133 | IGEN_SMP = @sim_igen_smp@ | |
134 | IGEN_LINE_NR = @sim_line_nr@ | |
135 | DGEN_FLAGS = @sim_switch@ | |
136 | ||
137 | HDEFINES = @HDEFINES@ | |
138 | TDEFINES = | |
139 | IGEN_FLAGS = \ | |
140 | $(IGEN_DECODE_MECHANISM) \ | |
141 | $(IGEN_DUPLICATE) \ | |
142 | $(IGEN_JUMP) \ | |
143 | $(IGEN_FILTER) \ | |
144 | $(IGEN_ICACHE) \ | |
145 | $(IGEN_SMP) \ | |
146 | $(IGEN_LINE_NR) | |
147 | ||
148 | .NOEXPORT: | |
149 | MAKEOVERRIDES= | |
150 | ||
151 | LIB_INCLUDES = -I$(srcdir)/../../include | |
152 | BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd | |
2a0c8810 | 153 | GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config |
8d64d0fd | 154 | |
79730a3b | 155 | INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) |
c906108c SS |
156 | |
157 | LIBIBERTY_LIB = ../../libiberty/libiberty.a | |
79730a3b | 158 | BFD_LIB = ../../bfd/libbfd.a |
aadc9410 | 159 | ZLIB = @zlibdir@ -lz |
c906108c | 160 | |
20e95c23 DJ |
161 | LIBINTL = @LIBINTL@ |
162 | LIBINTL_DEP = @LIBINTL_DEP@ | |
163 | INTL_CFLAGS = @INCINTL@ | |
bf1024d6 | 164 | |
c906108c SS |
165 | |
166 | TARGETLIB = libsim.a | |
167 | ||
168 | all: run $(TARGETLIB) $(GDB_OBJ) | |
169 | ||
170 | .c.o: | |
171 | $(CC) -c $(STD_CFLAGS) $< | |
172 | ||
173 | ||
6e9114ad JB |
174 | # Headers outside sim/ppc. |
175 | ANSIDECL_H = $(srcroot)/include/ansidecl.h | |
176 | BFD_H = ../../bfd/bfd.h | |
6e9114ad JB |
177 | GDB_CALLBACK_H = $(srcroot)/include/gdb/callback.h |
178 | GDB_REMOTE_SIM_H = $(srcroot)/include/gdb/remote-sim.h | |
91cd1042 | 179 | GDB_SIM_PPC_H = $(srcroot)/include/gdb/sim-ppc.h |
6e9114ad JB |
180 | COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h |
181 | COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h | |
182 | COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h | |
183 | COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h | |
184 | COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h | |
185 | ||
186 | # Headers in sim/ppc. | |
187 | ACCONFIG_H = \ | |
188 | acconfig.h | |
189 | ||
190 | ALTIVEC_EXPRESSION_H = \ | |
191 | altivec_expression.h | |
192 | ||
193 | ALTIVEC_REGISTERS_H = \ | |
194 | altivec_registers.h | |
c906108c SS |
195 | |
196 | BASICS_H = \ | |
197 | basics.h \ | |
6e9114ad JB |
198 | $(CONFIG_H) \ |
199 | $(PPC_CONFIG_H) \ | |
200 | $(INLINE_H) \ | |
201 | $(SIM_CALLBACKS_H) \ | |
202 | $(DEBUG_H) \ | |
203 | $(WORDS_H) \ | |
204 | $(BITS_H) \ | |
205 | $(SIM_ENDIAN_H) | |
206 | ||
207 | BITS_H = \ | |
c906108c | 208 | bits.h \ |
6e9114ad | 209 | bits.c |
c906108c | 210 | |
6e9114ad JB |
211 | CAP_H = \ |
212 | cap.h \ | |
c906108c SS |
213 | $(BASICS_H) |
214 | ||
6e9114ad JB |
215 | COREFILE_H = \ |
216 | corefile.h | |
c906108c | 217 | |
6e9114ad JB |
218 | COREFILE_N_H = \ |
219 | corefile-n.h | |
c906108c SS |
220 | |
221 | CPU_H = \ | |
222 | cpu.h \ | |
223 | $(BASICS_H) \ | |
224 | $(REGISTERS_H) \ | |
6e9114ad JB |
225 | $(DEVICE_H) \ |
226 | $(COREFILE_H) \ | |
227 | $(VM_H) \ | |
228 | $(EVENTS_H) \ | |
229 | $(INTERRUPTS_H) \ | |
230 | $(PSIM_H) \ | |
c906108c | 231 | $(IDECODE_H) \ |
6e9114ad JB |
232 | $(ITABLE_H) \ |
233 | $(OS_EMUL_H) \ | |
234 | $(MON_H) \ | |
235 | $(MODEL_H) \ | |
236 | cpu.c | |
237 | ||
238 | DEBUG_H = \ | |
239 | debug.h \ | |
240 | $(FILTER_FILENAME_H) | |
241 | ||
242 | DEVICE_H = \ | |
243 | device.h | |
c906108c SS |
244 | |
245 | DEVICE_TABLE_H = \ | |
c906108c | 246 | device_table.h \ |
6e9114ad JB |
247 | $(BASICS_H) \ |
248 | $(DEVICE_H) \ | |
249 | $(TREE_H) \ | |
250 | $(HW_H) | |
251 | ||
252 | E500_EXPRESSION_H = \ | |
253 | e500_expression.h | |
254 | ||
255 | E500_REGISTERS_H = \ | |
256 | e500_registers.h | |
257 | ||
258 | EMUL_BUGAPI_H = \ | |
259 | emul_bugapi.h | |
260 | ||
261 | EMUL_CHIRP_H = \ | |
262 | emul_chirp.h | |
c906108c SS |
263 | |
264 | EMUL_GENERIC_H = \ | |
6e9114ad | 265 | emul_generic.h \ |
c906108c SS |
266 | $(CPU_H) \ |
267 | $(IDECODE_H) \ | |
6e9114ad JB |
268 | $(OS_EMUL_H) \ |
269 | $(TREE_H) \ | |
270 | $(BFD_H) | |
271 | ||
272 | EMUL_NETBSD_H = \ | |
273 | emul_netbsd.h | |
274 | ||
275 | EMUL_UNIX_H = \ | |
276 | emul_unix.h | |
277 | ||
278 | EVENTS_H = \ | |
279 | events.h | |
280 | ||
281 | FILTER_FILENAME_H = \ | |
282 | filter_filename.h | |
283 | ||
284 | FILTER_H = \ | |
285 | filter.h | |
286 | ||
287 | GEN_ICACHE_H = \ | |
288 | gen-icache.h | |
289 | ||
290 | GEN_IDECODE_H = \ | |
291 | gen-idecode.h | |
292 | ||
293 | GEN_ITABLE_H = \ | |
294 | gen-itable.h | |
295 | ||
296 | GEN_MODEL_H = \ | |
297 | gen-model.h | |
298 | ||
299 | GEN_SEMANTICS_H = \ | |
300 | gen-semantics.h | |
301 | ||
302 | GEN_SUPPORT_H = \ | |
303 | gen-support.h | |
304 | ||
305 | HW_CPU_H = \ | |
306 | hw_cpu.h | |
307 | ||
308 | HW_PHB_H = \ | |
309 | hw_phb.h | |
310 | ||
311 | IDECODE_BRANCH_H = \ | |
312 | idecode_branch.h | |
313 | ||
314 | IDECODE_EXPRESSION_H = \ | |
315 | idecode_expression.h \ | |
316 | $(ALTIVEC_EXPRESSION_H) \ | |
317 | $(E500_EXPRESSION_H) | |
318 | ||
319 | IDECODE_FIELDS_H = \ | |
320 | idecode_fields.h | |
321 | ||
322 | IGEN_H = \ | |
323 | igen.h | |
324 | ||
325 | INLINE_H = \ | |
326 | inline.h | |
327 | ||
328 | INTERRUPTS_H = \ | |
329 | interrupts.h | |
330 | ||
331 | LD_CACHE_H = \ | |
332 | ld-cache.h | |
333 | ||
334 | LD_DECODE_H = \ | |
335 | ld-decode.h | |
336 | ||
337 | LD_INSN_H = \ | |
338 | ld-insn.h | |
339 | ||
340 | LF_H = \ | |
341 | lf.h | |
342 | ||
343 | MISC_H = \ | |
344 | misc.h \ | |
345 | $(CONFIG_H) \ | |
346 | $(FILTER_FILENAME_H) | |
347 | ||
348 | MON_H = \ | |
349 | mon.h \ | |
350 | $(BASICS_H) \ | |
351 | $(ITABLE_H) | |
352 | ||
353 | OPTIONS_H = \ | |
354 | options.h | |
355 | ||
356 | OS_EMUL_H = \ | |
c906108c SS |
357 | os_emul.h |
358 | ||
6e9114ad JB |
359 | PSIM_H = \ |
360 | psim.h \ | |
361 | $(BASICS_H) | |
362 | ||
363 | REGISTERS_H = \ | |
364 | registers.h \ | |
365 | $(E500_REGISTERS_H) \ | |
366 | $(ALTIVEC_REGISTERS_H) \ | |
367 | $(SPREG_H) | |
368 | ||
369 | SIM_CALLBACKS_H = \ | |
370 | sim_callbacks.h | |
371 | ||
372 | SIM_ENDIAN_H = \ | |
373 | sim-endian.h \ | |
374 | sim-endian.c | |
375 | ||
376 | SIM_ENDIAN_N_H = \ | |
377 | sim-endian-n.h | |
378 | ||
379 | SIM_MAIN_H = \ | |
380 | sim-main.h \ | |
381 | $(COMMON_SIM_BASICS_H) \ | |
382 | $(COMMON_SIM_SIGNAL_H) \ | |
383 | $(COMMON_SIM_BASE_H) | |
384 | ||
385 | STD_CONFIG_H = \ | |
386 | std-config.h | |
387 | ||
388 | TABLE_H = \ | |
389 | table.h | |
390 | ||
391 | TREE_H = \ | |
392 | tree.h | |
393 | ||
394 | VM_H = \ | |
395 | vm.h | |
396 | ||
397 | VM_N_H = \ | |
398 | vm_n.h | |
399 | ||
400 | WORDS_H = \ | |
401 | words.h | |
402 | ||
403 | ||
404 | # Generated headers. | |
405 | CONFIG_H = \ | |
406 | config.h | |
407 | ||
408 | DEFINES_H = \ | |
409 | defines.h | |
410 | ||
411 | HW_H = \ | |
412 | hw.h | |
413 | ||
414 | ICACHE_H = \ | |
415 | icache.h | |
416 | ||
417 | IDECODE_H = \ | |
418 | idecode.h \ | |
419 | $(IDECODE_EXPRESSION_H) \ | |
420 | $(IDECODE_FIELDS_H) \ | |
421 | $(IDECODE_BRANCH_H) | |
422 | ||
423 | ITABLE_H = \ | |
424 | itable.h | |
425 | ||
426 | MODEL_H = \ | |
427 | model.h | |
428 | ||
429 | PK_H = \ | |
430 | pk.h | |
431 | ||
432 | PPC_CONFIG_H = \ | |
433 | ppc-config.h | |
434 | ||
435 | SEMANTICS_H = \ | |
436 | semantics.h | |
437 | ||
438 | SPREG_H = \ | |
439 | spreg.h | |
440 | ||
441 | SUPPORT_H = \ | |
442 | support.h \ | |
443 | support.c | |
444 | ||
445 | TARG_VALS_H = \ | |
446 | targ-vals.h | |
447 | ||
c906108c SS |
448 | INLINE = \ |
449 | inline.h \ | |
450 | inline.c | |
451 | ||
452 | BUILT_SRC_WO_CONFIG = \ | |
453 | icache.h icache.c \ | |
454 | support.h support.c \ | |
455 | idecode.h idecode.c \ | |
456 | semantics.h semantics.c \ | |
457 | itable.h itable.c \ | |
458 | spreg.h spreg.c \ | |
459 | model.h model.c \ | |
460 | support.h support.c \ | |
461 | pk.h \ | |
462 | hw.h hw.c \ | |
463 | filter_host.c \ | |
464 | @sim_targ_vals@ | |
465 | ||
466 | BUILT_SRC = \ | |
467 | $(BUILT_SRC_WO_CONFIG) \ | |
468 | config.h \ | |
469 | ppc-config.h | |
470 | ||
471 | LIB_INLINE_SRC = \ | |
472 | psim.c \ | |
473 | bits.c \ | |
474 | debug.c \ | |
475 | sim-endian.c \ | |
476 | sim-endian.h \ | |
477 | sim-endian-n.h \ | |
478 | vm.c \ | |
479 | vm_n.h \ | |
480 | corefile.c \ | |
481 | events.c \ | |
482 | os_emul.c \ | |
483 | registers.c \ | |
484 | cpu.c \ | |
485 | interrupts.c \ | |
486 | device.c \ | |
487 | tree.c \ | |
488 | device_table.c \ | |
489 | cap.c \ | |
490 | mon.c \ | |
491 | options.c | |
492 | ||
493 | LIB_SRC = \ | |
494 | $(PACKAGE_SRC) \ | |
495 | $(HW_SRC) \ | |
496 | $(LIB_INLINE_SRC) | |
497 | ||
498 | MAIN_SRC = \ | |
499 | main.c \ | |
91cd1042 | 500 | gdb-sim.c \ |
c906108c SS |
501 | sim_calls.c |
502 | ||
503 | ||
504 | # NOTE: semantics, idecode and psim put last so smaller files are compiled | |
505 | # first | |
506 | LIB_OBJ = \ | |
507 | debug.o \ | |
508 | filter_filename.o \ | |
509 | bits.o \ | |
510 | sim-endian.o \ | |
511 | os_emul.o \ | |
512 | emul_generic.o \ | |
513 | emul_bugapi.o \ | |
514 | emul_chirp.o \ | |
515 | emul_netbsd.o \ | |
516 | emul_unix.o \ | |
517 | registers.o \ | |
518 | vm.o \ | |
519 | corefile.o \ | |
520 | model.o \ | |
521 | spreg.o \ | |
522 | cpu.o \ | |
523 | interrupts.o \ | |
524 | events.o \ | |
525 | cap.o \ | |
526 | device.o \ | |
527 | tree.o \ | |
528 | device_table.o \ | |
529 | itable.o \ | |
530 | mon.o \ | |
531 | icache.o \ | |
532 | semantics.o \ | |
533 | idecode.o \ | |
534 | support.o \ | |
d29d5195 | 535 | @sim_fpu@ \ |
c906108c | 536 | psim.o \ |
6efef468 | 537 | version.o \ |
c906108c SS |
538 | $(PACKAGE_OBJ) \ |
539 | $(HW_OBJ) \ | |
540 | options.o | |
541 | ||
542 | ||
91cd1042 | 543 | GDB_OBJ = gdb-sim.o sim_calls.o @sim_callback@ |
c906108c SS |
544 | |
545 | HW_SRC = @sim_hw_src@ | |
546 | HW_OBJ = @sim_hw_obj@ | |
547 | ||
548 | PACKAGE_SRC = @sim_pk_src@ | |
549 | PACKAGE_OBJ = @sim_pk_obj@ | |
550 | ||
551 | ||
0d8a6ab7 | 552 | psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) |
0ceaf1ec | 553 | $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(ZLIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) |
c906108c SS |
554 | |
555 | run: psim | |
556 | rm -f run$(EXEEXT) | |
557 | ln psim$(EXEEXT) run$(EXEEXT) | |
558 | ||
559 | $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ) | |
560 | rm -f $(TARGETLIB) | |
561 | $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ) | |
562 | $(RANLIB) $(TARGETLIB) | |
563 | ||
887bddbc MF |
564 | version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/gdb/common/create-version.sh |
565 | $(SHELL) $(srcroot)/gdb/common/create-version.sh $(srcroot)/gdb \ | |
566 | $(host_alias) $(target_alias) version.c | |
6efef468 JM |
567 | version.o: version.c $(version_h) |
568 | ||
6e9114ad | 569 | psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H) |
c906108c SS |
570 | |
571 | bits.o: bits.c $(BASICS_H) | |
572 | ||
6e9114ad JB |
573 | debug.o: debug.c $(CONFIG_H) $(BASICS_H) |
574 | filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H) | |
c906108c | 575 | |
6e9114ad | 576 | sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H) |
c906108c | 577 | |
6e9114ad | 578 | 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) |
c906108c SS |
579 | emul_generic.o: emul_generic.c $(EMUL_GENERIC_H) |
580 | ||
6e9114ad JB |
581 | emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H) |
582 | emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H) | |
583 | emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) | |
584 | emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H) | |
c906108c | 585 | |
6e9114ad | 586 | registers.o: registers.c $(BASICS_H) $(REGISTERS_H) |
c906108c SS |
587 | |
588 | cpu.o: cpu.c $(CPU_H) $(IDECODE_H) | |
589 | ||
6e9114ad | 590 | interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) |
c906108c SS |
591 | |
592 | # Given that inlines are turned on now, rebuild idecode whenever | |
593 | # anything changes. | |
6e9114ad | 594 | idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC) |
c906108c SS |
595 | |
596 | # double.o: double.c dp-bit.c | |
597 | ||
6e9114ad | 598 | vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H) |
c906108c | 599 | |
6e9114ad | 600 | corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H) |
c906108c | 601 | |
6e9114ad | 602 | model.o: model.c $(CPU_H) $(MON_H) |
c906108c | 603 | |
6e9114ad | 604 | events.o: events.c $(BASICS_H) $(EVENTS_H) |
c906108c | 605 | |
f37b123d | 606 | sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H) |
c906108c | 607 | |
91cd1042 AC |
608 | gdb-sim.o: gdb-sim.c $(PSIM_H) $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H) $(GDB_SIM_PPC_H) $(SIM_CALLBACK_H) |
609 | ||
6e9114ad | 610 | spreg.o: spreg.c $(BASICS_H) $(SPREG_H) |
c906108c | 611 | |
6e9114ad | 612 | main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H) |
c906108c | 613 | |
6e9114ad | 614 | device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H) |
c906108c | 615 | |
6e9114ad | 616 | tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H) |
c906108c | 617 | |
6e9114ad | 618 | device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c |
c906108c | 619 | |
6e9114ad | 620 | cap.o: cap.c $(CAP_H) |
c906108c | 621 | |
6e9114ad | 622 | semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H) |
c906108c | 623 | |
6e9114ad | 624 | icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H) |
c906108c | 625 | |
6e9114ad | 626 | support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H) |
c906108c | 627 | |
6e9114ad | 628 | itable.o: itable.c $(ITABLE_H) |
c906108c | 629 | |
6e9114ad | 630 | mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H) |
c906108c SS |
631 | |
632 | # GDB after 4.16 expects the default_callback structure to be setup. | |
633 | # As a kludge, build the common stuff here for now. | |
7c125e3b MF |
634 | gentmap: $(srcdir)/../common/gentmap.c Makefile targ-vals.def |
635 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -I. -I../common -I$(srcdir)/../common \ | |
636 | -o gentmap $(srcdir)/../common/gentmap.c $(BUILD_LIBS) | |
c906108c SS |
637 | |
638 | targ-vals.def: $(srcdir)/../common/nltvals.def | |
639 | rm -f targ-vals.def tmp-def | |
640 | cat $(srcdir)/../common/nltvals.def > tmp-vals.def | |
ae451ac6 | 641 | $(SHELL) $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def |
c906108c SS |
642 | |
643 | targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change | |
644 | rm -f tmp-vals.h | |
645 | ./gentmap -h > tmp-vals.h | |
ae451ac6 | 646 | $(SHELL) $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h |
c906108c SS |
647 | |
648 | targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change | |
649 | rm -f tmp-map.c | |
650 | ./gentmap -c > tmp-map.c | |
ae451ac6 | 651 | $(SHELL) $(srcdir)/../../move-if-change tmp-map.c targ-map.c |
c906108c | 652 | |
7c125e3b MF |
653 | callback.o: $(srcdir)/../common/callback.c $(TARG_VALS_H) $(CONFIG_H) |
654 | $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/callback.c | |
c906108c | 655 | |
6e9114ad | 656 | targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H) |
c906108c | 657 | |
1b393626 | 658 | sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) |
d29d5195 MG |
659 | $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c |
660 | ||
c906108c | 661 | # Rebuild options whenever something changes so the date/time is up to date. |
6e9114ad | 662 | options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile |
7c125e3b | 663 | $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $(srcdir)/options.c |
c906108c | 664 | |
99b57276 | 665 | defines.h: tmp-defines; @true |
c906108c SS |
666 | tmp-defines: config.h Makefile |
667 | sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h | |
ae451ac6 | 668 | $(SHELL) $(srcdir)/../../move-if-change tmp-defines.h defines.h |
c906108c SS |
669 | touch tmp-defines |
670 | ||
671 | # | |
672 | # Rules to create the built c source code files | |
673 | # | |
674 | ||
675 | ppc-config.h: $(CONFIG_FILE) | |
676 | cp $(srcdir)/$(CONFIG_FILE) ppc-config.h | |
677 | ||
678 | ||
679 | tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change | |
680 | ./dgen $(DGEN_FLAGS) \ | |
681 | -r $(srcdir)/ppc-spr-table \ | |
682 | -n spreg.h -hp tmp-spreg.h \ | |
683 | -n spreg.c -p tmp-spreg.c | |
ae451ac6 ILT |
684 | $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.h spreg.h |
685 | $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c | |
c906108c SS |
686 | touch tmp-dgen |
687 | ||
345d88d9 | 688 | tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter |
c906108c SS |
689 | ./igen $(IGEN_FLAGS) \ |
690 | -o $(srcdir)/$(IGEN_OPCODE_RULES) \ | |
43c4bab0 | 691 | -I $(srcdir) -i $(srcdir)/ppc-instructions \ |
c906108c SS |
692 | -n icache.h -hc tmp-icache.h \ |
693 | -n icache.c -c tmp-icache.c \ | |
694 | -n semantics.h -hs tmp-semantics.h \ | |
695 | -n semantics.c -s tmp-semantics.c \ | |
696 | -n idecode.h -hd tmp-idecode.h \ | |
697 | -n idecode.c -d tmp-idecode.c \ | |
698 | -n itable.h -ht tmp-itable.h \ | |
699 | -n itable.c -t tmp-itable.c \ | |
700 | -n model.h -hm tmp-model.h \ | |
701 | -n model.c -m tmp-model.c \ | |
702 | -n support.h -hf tmp-support.h \ | |
703 | -n support.c -f tmp-support.c | |
ae451ac6 ILT |
704 | $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h icache.h |
705 | $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c icache.c | |
706 | $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h idecode.h | |
707 | $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c idecode.c | |
708 | $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h semantics.h | |
709 | $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c semantics.c | |
710 | $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h | |
711 | $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c | |
712 | $(SHELL) $(srcdir)/../../move-if-change tmp-model.h model.h | |
713 | $(SHELL) $(srcdir)/../../move-if-change tmp-model.c model.c | |
714 | $(SHELL) $(srcdir)/../../move-if-change tmp-support.h support.h | |
715 | $(SHELL) $(srcdir)/../../move-if-change tmp-support.c support.c | |
c906108c SS |
716 | touch tmp-igen |
717 | ||
718 | # NOTE: Some versions of make don't handle files created as side-effects | |
719 | # uncomment the below if that is the case. | |
720 | ||
721 | $(TARGETLIB): tmp-igen tmp-dgen | |
722 | 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 | |
723 | spreg.h spreg.c: tmp-dgen | |
724 | ||
725 | dgen: dgen.o table.o lf.o misc.o filter_host.o | |
726 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o $(BUILD_LIBS) | |
727 | ||
728 | 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 | |
729 | $(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) | |
730 | ||
731 | filter_host.c: filter_filename.c | |
732 | cat $(srcdir)/filter_filename.c > filter_host.c | |
733 | ||
6e9114ad | 734 | filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H) |
c906108c SS |
735 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c |
736 | ||
6e9114ad | 737 | table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H) |
c906108c SS |
738 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c |
739 | ||
6e9114ad | 740 | lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H) |
c906108c SS |
741 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c |
742 | ||
6e9114ad | 743 | filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H) |
c906108c | 744 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c |
6e9114ad | 745 | tmp-filter: filter.c $(MISC_H) misc.o |
c906108c SS |
746 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS) |
747 | ||
6e9114ad | 748 | ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H) |
c906108c | 749 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c |
d8006e05 | 750 | tmp-ld-decode: ld-decode.c misc.o lf.o table.o filter_host.o |
c906108c SS |
751 | $(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) |
752 | ||
6e9114ad | 753 | ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H) |
c906108c | 754 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c |
d8006e05 | 755 | tmp-ld-cache: ld-cache.c misc.o lf.o table.o filter_host.o |
c906108c SS |
756 | $(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) |
757 | ||
6e9114ad | 758 | 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) |
c906108c | 759 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c |
d8006e05 | 760 | tmp-ld-insn: ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o |
d81bb16a | 761 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS) |
c906108c | 762 | |
6e9114ad | 763 | 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) |
c906108c SS |
764 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c |
765 | ||
6e9114ad | 766 | 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) |
c906108c SS |
767 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c |
768 | ||
6e9114ad | 769 | 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) |
c906108c SS |
770 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c |
771 | ||
6e9114ad | 772 | 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) |
c906108c SS |
773 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c |
774 | ||
6e9114ad | 775 | 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) |
c906108c SS |
776 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c |
777 | ||
6e9114ad | 778 | 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) |
c906108c SS |
779 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c |
780 | ||
6e9114ad | 781 | dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H) |
c906108c SS |
782 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c |
783 | ||
6e9114ad | 784 | 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) |
c906108c SS |
785 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c |
786 | ||
6e9114ad | 787 | misc.o: misc.c $(CONFIG_H) $(MISC_H) |
c906108c SS |
788 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c |
789 | ||
790 | ||
791 | ||
792 | # real hardware | |
99b57276 | 793 | hw.c hw.h: tmp-hw; @true |
c906108c SS |
794 | tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change |
795 | # The first for loop is to remove duplicates. | |
796 | f=""; \ | |
797 | for i in $(HW_SRC) ; do \ | |
798 | case " $$f " in \ | |
799 | *" $$i "*) ;; \ | |
800 | *) f="$$f $$i" ;; \ | |
801 | esac ; \ | |
802 | done ; \ | |
803 | for hw in $$f ; do echo $$hw ; done \ | |
804 | | sed -e 's/^.*\(hw_.*\)\.c/\1/' \ | |
805 | -e 's/^/extern const device_descriptor /' \ | |
806 | -e 's/$$/_device_descriptor\[\];/' \ | |
807 | > tmp-hw.h | |
808 | f=""; \ | |
809 | for i in $(HW_SRC) ; do \ | |
810 | case " $$f " in \ | |
811 | *" $$i "*) ;; \ | |
812 | *) f="$$f $$i" ;; \ | |
813 | esac ; \ | |
814 | done ; \ | |
815 | for hw in $$f ; do echo $$hw ; done \ | |
816 | | sed -e 's/^.*\(hw_.*\)\.c/\1/' \ | |
817 | -e 's/^/ /' \ | |
818 | -e 's/$$/_device_descriptor,/' \ | |
819 | > tmp-hw.c | |
ae451ac6 ILT |
820 | $(SHELL) $(srcdir)/../../move-if-change tmp-hw.h hw.h |
821 | $(SHELL) $(srcdir)/../../move-if-change tmp-hw.c hw.c | |
c906108c SS |
822 | touch tmp-hw |
823 | ||
6e9114ad | 824 | hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H) |
38edcf8a | 825 | hw_com.o: hw_com.c $(DEVICE_TABLE_H) |
6e9114ad JB |
826 | hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H) |
827 | hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H) | |
38edcf8a | 828 | hw_eeprom.o: hw_eeprom.c $(DEVICE_TABLE_H) |
c906108c | 829 | hw_glue.o: hw_glue.c $(DEVICE_TABLE_H) |
6e9114ad | 830 | hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H) |
c906108c | 831 | hw_ide.o: hw_ide.c $(DEVICE_TABLE_H) |
6e9114ad | 832 | hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H) |
c906108c SS |
833 | hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H) |
834 | hw_memory.o: hw_memory.c $(DEVICE_TABLE_H) | |
835 | hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H) | |
836 | hw_opic.o: hw_opic.c $(DEVICE_TABLE_H) | |
54cfd411 | 837 | hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H) |
6e9114ad JB |
838 | hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H) |
839 | hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H) | |
00a0b122 JS |
840 | hw_sem.o: hw_sem.c $(DEVICE_TABLE_H) $(PSIM_H) |
841 | hw_shm.o: hw_shm.c $(DEVICE_TABLE_H) $(PSIM_H) | |
c906108c | 842 | hw_trace.o: hw_trace.c $(DEVICE_TABLE_H) |
54cfd411 | 843 | hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H) |
c906108c SS |
844 | # ignore this line, it stops make from getting confused |
845 | ||
846 | ||
847 | ||
848 | # real packages | |
99b57276 | 849 | pk.h: tmp-pk; @true |
c906108c SS |
850 | tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change |
851 | # The first for loop is to remove duplicates. | |
852 | f=""; \ | |
853 | for i in $(PACKAGE_SRC) ; do \ | |
854 | case " $$f " in \ | |
855 | *" $$i "*) ;; \ | |
856 | *) f="$$f $$i" ;; \ | |
857 | esac ; \ | |
858 | done ; \ | |
859 | for pk in $$f ; do echo $$pk ; done \ | |
860 | | sed -e 's/^.*pk_\(.*\)\.c/\1/' \ | |
861 | -e 's/^/extern package_create_instance_callback pk_/' \ | |
862 | -e 's/$$/_create_instance;/' \ | |
863 | > tmp-pk.h | |
ae451ac6 | 864 | $(SHELL) $(srcdir)/../../move-if-change tmp-pk.h pk.h |
c906108c SS |
865 | touch tmp-pk |
866 | ||
6e9114ad | 867 | pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H) |
c906108c SS |
868 | # ignore this line, it stops make from getting confused |
869 | ||
870 | ||
871 | ||
872 | tags etags: TAGS | |
873 | ||
874 | TAGS: $(BUILT_SRC) | |
875 | etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC) | |
876 | ||
877 | clean mostlyclean: | |
878 | rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG) gentmap | |
879 | ||
880 | distclean realclean: clean | |
881 | rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log | |
882 | ||
883 | maintainer-clean: distclean | |
884 | rm -f *~ *.log ppc-config.h core *.core | |
885 | ||
886 | Makefile: Makefile.in config.status | |
887 | CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status | |
888 | ||
889 | config.h: stamp-h ; @true | |
890 | stamp-h: config.in config.status | |
891 | CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status | |
892 | ||
893 | config.status: configure | |
894 | $(SHELL) ./config.status --recheck | |
895 | ||
896 | install: installdirs | |
897 | n=`echo run | sed '$(program_transform_name)'`; \ | |
5a645dc5 | 898 | $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |
c906108c SS |
899 | |
900 | installdirs: | |
5a645dc5 | 901 | $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir) |