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