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