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