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