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