]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/ppc/Makefile.in
January 23rd merge
[thirdparty/binutils-gdb.git] / sim / ppc / Makefile.in
1 #
2 # This file is part of the program psim.
3 #
4 # Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
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
8 # the Free Software Foundation; either version 2 of the License, or
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
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20
21 default: all
22
23 VPATH = @srcdir@
24 srcdir = @srcdir@
25 srcroot = $(srcdir)/../..
26
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29
30 host_alias = @host_alias@
31 target_alias = @target_alias@
32 program_transform_name = @program_transform_name@
33 bindir = @bindir@
34 libdir = @libdir@
35 tooldir = $(libdir)/$(target_alias)
36
37 datadir = @datadir@
38 mandir = @mandir@
39 man1dir = $(mandir)/man1
40 man2dir = $(mandir)/man2
41 man3dir = $(mandir)/man3
42 man4dir = $(mandir)/man4
43 man5dir = $(mandir)/man5
44 man6dir = $(mandir)/man6
45 man7dir = $(mandir)/man7
46 man8dir = $(mandir)/man8
47 man9dir = $(mandir)/man9
48 infodir = @infodir@
49 includedir = @includedir@
50
51 SHELL = /bin/sh
52
53 INSTALL = $(srcroot)/install.sh -c
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_DATA = @INSTALL_DATA@
56 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
57 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
58
59 AR = @AR@
60 AR_FLAGS = rc
61 CC = @CC@
62 CFLAGS = @CFLAGS@
63 CC_FOR_BUILD = @CC_FOR_BUILD@
64 BISON = bison
65 MAKEINFO = makeinfo
66 RANLIB = @RANLIB@
67
68 SIM_CFLAGS = @sim_cflags@
69 INLINE_CFLAGS = @sim_inline@
70 BSWAP_CFLAGS = @sim_bswap@
71 ENDIAN_CFLAGS = @sim_endian@
72 REGPARM_CFLAGS = @sim_regparm@
73 STDCALL_CFLAGS = @sim_stdcall@
74 HOSTENDIAN_CFLAGS = @sim_hostendian@
75 SMP_CFLAGS = @sim_smp@
76 XOR_ENDIAN_CFLAGS = @sim_xor_endian@
77 BITSIZE_CFLAGS = @sim_bitsize@
78 HOSTBITSIZE_CFLAGS = @sim_hostbitsize@
79 ENV_CFLAGS = @sim_env@
80 TIMEBASE_CFLAGS = @sim_timebase@
81 ALIGNMENT_CFLAGS = @sim_alignment@
82 FLOAT_CFLAGS = @sim_float@
83 TRACE_CFLAGS = @sim_trace@
84 ASSERT_CFLAGS = @sim_assert@
85 RESERVED_CFLAGS = @sim_reserved@
86 MONITOR_CFLAGS = @sim_monitor@
87 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
88 STDIO_CFLAGS = @sim_stdio@
89 TERMIO_CFLAGS = @sim_termio@
90 WARNING_CFLAGS = @sim_warnings@
91 DEVZERO_CFLAGS = @sim_devzero@
92 CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
93 $(ENDIAN_CFLAGS) \
94 $(REGPARM_CFLAGS) \
95 $(STDCALL_CFLAGS) \
96 $(HOSTENDIAN_CFLAGS) \
97 $(SMP_CFLAGS) \
98 $(XOR_ENDIAN_CFLAGS) \
99 $(BITSIZE_CFLAGS) \
100 $(HOSTBITSIZE_CFLAGS) \
101 $(ENV_CFLAGS) \
102 $(TIMEBASE_CFLAGS) \
103 $(ALIGNMENT_CFLAGS) \
104 $(FLOAT_CFLAGS) \
105 $(TRACE_CFLAGS) \
106 $(ASSERT_CFLAGS) \
107 $(RESERVED_CFLAGS) \
108 $(MONITOR_CFLAGS) \
109 $(MODEL_CFLAGS) \
110 $(STDIO_CFLAGS) \
111 $(TERMIO_CFLAGS) \
112 $(DEVZERO_CFLAGS)
113
114 STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
115 NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
116 BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
117
118 BUILD_LDFLAGS =
119
120 CONFIG_FILE = @sim_config@
121 IGEN_OPCODE_RULES = @sim_opcode@
122 IGEN_DUPLICATE = @sim_dup@
123 IGEN_JUMP = @sim_jump@
124 IGEN_FILTER = @sim_filter@
125 IGEN_ICACHE = @sim_icache@
126 IGEN_SMP = @sim_igen_smp@
127 IGEN_LINE_NR = @sim_line_nr@
128 DGEN_FLAGS = @sim_switch@
129
130 HDEFINES = @HDEFINES@
131 TDEFINES =
132 IGEN_FLAGS = $(IGEN_DUPLICATE) $(IGEN_JUMP) $(IGEN_FILTER) $(IGEN_ICACHE) $(IGEN_SMP) $(IGEN_LINE_NR)
133
134 .NOEXPORT:
135 MAKEOVERRIDES=
136
137 LIB_INCLUDES = -I$(srcdir)/../../include
138 BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
139 GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
140 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
141
142 LIBIBERTY_LIB = ../../libiberty/libiberty.a
143 BFD_LIB = ../../bfd/libbfd.a
144
145 TARGETLIB = libsim.a
146
147 all: run $(TARGETLIB) $(GDB_OBJ)
148
149 .c.o:
150 $(CC) -c $(STD_CFLAGS) $<
151
152
153
154 BASICS_H = \
155 basics.h \
156 config.h \
157 ppc-config.h \
158 inline.h \
159 sim_callbacks.h \
160 debug.h filter_filename.h \
161 words.h \
162 bits.h \
163 sim-endian.h
164
165 PSIM_H = \
166 psim.h \
167 $(BASICS_H)
168
169 IDECODE_H = \
170 idecode.h \
171 idecode_expression.h \
172 idecode_branch.h \
173 idecode_fields.h \
174 icache.h
175
176 REGISTERS_H = \
177 registers.h \
178 spreg.h
179
180 CPU_H = \
181 cpu.h \
182 $(BASICS_H) \
183 $(REGISTERS_H) \
184 $(IDECODE_H) \
185 device.h \
186 corefile.h \
187 vm.h \
188 events.h \
189 interrupts.h \
190 psim.h \
191 itable.h \
192 mon.h \
193 model.h
194
195 DEVICE_TABLE_H = \
196 $(BASICS_H) \
197 device_table.h \
198 device.h \
199 tree.h \
200 hw.h
201
202 EMUL_GENERIC_H = \
203 $(CPU_H) \
204 $(IDECODE_H) \
205 emul_generic.h \
206 tree.h \
207 os_emul.h
208
209
210 INLINE = \
211 inline.h \
212 inline.c
213
214 BUILT_SRC_WO_CONFIG = \
215 icache.h icache.c \
216 support.h support.c \
217 idecode.h idecode.c \
218 semantics.h semantics.c \
219 itable.h itable.c \
220 spreg.h spreg.c \
221 model.h model.c \
222 support.h support.c \
223 pk.h \
224 hw.h hw.c \
225 filter_host.c
226
227 BUILT_SRC = \
228 $(BUILT_SRC_WO_CONFIG) \
229 config.h \
230 ppc-config.h
231
232 LIB_INLINE_SRC = \
233 psim.c \
234 bits.c \
235 debug.c \
236 sim-endian.c \
237 sim-endian.h \
238 sim-endian-n.h \
239 vm.c \
240 vm_n.h \
241 corefile.c \
242 events.c \
243 os_emul.c \
244 registers.c \
245 cpu.c \
246 interrupts.c \
247 device.c \
248 tree.c \
249 device_table.c \
250 cap.c \
251 mon.c \
252 options.c
253
254 LIB_SRC = \
255 $(PACKAGE_SRC) \
256 $(HW_SRC) \
257 $(LIB_INLINE_SRC)
258
259 MAIN_SRC = \
260 main.c \
261 sim_calls.c
262
263
264 # NOTE: semantics, idecode and psim put last so smaller files are compiled
265 # first
266 LIB_OBJ = \
267 debug.o \
268 filter_filename.o \
269 bits.o \
270 sim-endian.o \
271 os_emul.o \
272 emul_generic.o \
273 emul_bugapi.o \
274 emul_chirp.o \
275 emul_netbsd.o \
276 emul_unix.o \
277 registers.o \
278 vm.o \
279 corefile.o \
280 model.o \
281 spreg.o \
282 cpu.o \
283 interrupts.o \
284 events.o \
285 cap.o \
286 device.o \
287 tree.o \
288 device_table.o \
289 itable.o \
290 mon.o \
291 icache.o \
292 semantics.o \
293 idecode.o \
294 support.o \
295 psim.o \
296 $(PACKAGE_OBJ) \
297 $(HW_OBJ) \
298 options.o
299
300
301 GDB_OBJ = sim_calls.o
302
303 HW_SRC = @sim_hw_src@
304 HW_OBJ = @sim_hw_obj@
305
306 PACKAGE_SRC = @sim_pk_src@
307 PACKAGE_OBJ = @sim_pk_obj@
308
309
310 psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS)
311 $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim main.o $(TARGETLIB) $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
312
313 run: psim
314 rm -f run
315 ln psim run
316
317 $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk $(LIB_OBJ) $(GDB_OBJ)
318 rm -f $(TARGETLIB)
319 $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
320 $(RANLIB) $(TARGETLIB)
321
322 psim.o: psim.c psim.h tree.h $(CPU_H) $(IDECODE_H)
323
324 bits.o: bits.c $(BASICS_H)
325
326 debug.o: debug.c $(BASICS_H)
327 filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h
328
329 sim-endian.o: sim-endian.c sim-endian-n.h $(BASICS_H)
330
331 os_emul.o: os_emul.c emul_netbsd.h emul_unix.h emul_chirp.h emul_bugapi.h $(EMUL_GENERIC_H)
332 emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
333
334 emul_bugapi.o: emul_bugapi.c emul_bugapi.h $(EMUL_GENERIC_H)
335 emul_chirp.o: emul_chirp.c emul_chirp.h $(EMUL_GENERIC_H)
336 emul_netbsd.o: emul_netbsd.c emul_netbsd.h $(EMUL_GENERIC_H)
337 emul_unix.o: emul_unix.c emul_unix.h $(EMUL_GENERIC_H)
338
339 registers.o: registers.c $(REGISTERS_H) $(BASICS_H)
340
341 cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
342
343 interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
344
345 # Given that inlines are turned on now, rebuild idecode whenever
346 # anything changes.
347 idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h $(LIB_INLINE_SRC) $(BUILT_SRC)
348 $(CC) -c $(NOWARN_CFLAGS) $<
349
350 # double.o: double.c dp-bit.c
351
352 vm.o: vm.c vm.h vm_n.h $(CPU_H)
353
354 corefile.o: corefile.c corefile.h corefile-n.h $(BASICS_H) $(DEVICE_TABLE_H)
355
356 model.o: model.c $(CPU_H)
357
358 events.o: events.c events.h $(BASICS_H)
359
360 sim_calls.o: sim_calls.c $(PSIM_H) itable.h ../../gdb/tm.h options.h
361
362 spreg.o: spreg.c spreg.h spreg.c $(BASICS_H)
363
364 main.o: main.c $(PSIM_H) itable.h options.h
365
366 device.o: device.c $(DEVICE_TABLE_H) cap.h
367
368 tree.o: tree.c tree.h device.h $(DEVICE_TABLE_H)
369
370 device_table.o: device_table.c $(DEVICE_TABLE_H) events.h hw.c
371
372 cap.o: cap.c cap.h $(BASICS_H)
373
374 semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
375 $(CC) -c $(NOWARN_CFLAGS) $<
376
377 icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
378 $(CC) -c $(NOWARN_CFLAGS) $<
379
380 support.o: support.c support.h $(IDECODE_H) $(CPU_H)
381
382 itable.o: itable.c itable.h
383
384 mon.o: mon.c $(CPU_H)
385
386 # Rebuild options whenever something changes so the date/time is up to date.
387 options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
388 $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
389
390 defines.h: config.h Makefile
391 rm -f defines.h
392 sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > defines.h
393 #
394 # Rules to create the built c source code files
395 #
396
397 ppc-config.h: $(CONFIG_FILE)
398 cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
399
400
401 tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
402 ./dgen $(DGEN_FLAGS) \
403 -r $(srcdir)/ppc-spr-table \
404 -n spreg.h -hp tmp-spreg.h \
405 -n spreg.c -p tmp-spreg.c
406 $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
407 $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
408 touch tmp-dgen
409
410
411 tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) ppc-cache-rules $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
412 ./igen $(IGEN_FLAGS) \
413 -o $(srcdir)/$(IGEN_OPCODE_RULES) \
414 -k $(srcdir)/ppc-cache-rules \
415 -i $(srcdir)/ppc-instructions \
416 -n icache.h -hc tmp-icache.h \
417 -n icache.c -c tmp-icache.c \
418 -n semantics.h -hs tmp-semantics.h \
419 -n semantics.c -s tmp-semantics.c \
420 -n idecode.h -hd tmp-idecode.h \
421 -n idecode.c -d tmp-idecode.c \
422 -n itable.h -ht tmp-itable.h \
423 -n itable.c -t tmp-itable.c \
424 -n model.h -hm tmp-model.h \
425 -n model.c -m tmp-model.c \
426 -n support.h -hf tmp-support.h \
427 -n support.c -f tmp-support.c
428 $(srcdir)/../../move-if-change tmp-icache.h icache.h
429 $(srcdir)/../../move-if-change tmp-icache.c icache.c
430 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
431 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
432 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
433 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
434 $(srcdir)/../../move-if-change tmp-itable.h itable.h
435 $(srcdir)/../../move-if-change tmp-itable.c itable.c
436 $(srcdir)/../../move-if-change tmp-model.h model.h
437 $(srcdir)/../../move-if-change tmp-model.c model.c
438 $(srcdir)/../../move-if-change tmp-support.h support.h
439 $(srcdir)/../../move-if-change tmp-support.c support.c
440 touch tmp-igen
441
442 # NOTE: Some versions of make don't handle files created as side-effects
443 # uncomment the below if that is the case.
444
445 $(TARGETLIB): tmp-igen tmp-dgen
446 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
447 spreg.h spreg.c: tmp-dgen
448
449 dgen: dgen.o table.o lf.o misc.o filter_host.o
450 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o $(BUILD_LIBS)
451
452 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
453 $(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)
454
455 filter_host.c: filter_filename.c
456 cat $(srcdir)/filter_filename.c > filter_host.c
457
458 filter_host.o: filter_host.c filter_filename.h config.h ppc-config.h
459 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
460
461 table.o: table.c misc.h filter_filename.h lf.h table.h
462 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
463
464 lf.o: lf.c misc.h filter_filename.h lf.h
465 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
466
467 filter.o: filter.c misc.h lf.h table.h filter.h
468 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
469 tmp-filter: filter.c misc.h misc.o
470 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
471
472 ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h
473 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
474 tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
475 $(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)
476
477 ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h
478 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
479 tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
480 $(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)
481
482 ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
483 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
484 tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
485 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
486
487 gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
488 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
489
490 gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
491 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
492
493 gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
494 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
495
496 gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h igen.h ld-insn.h
497 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
498
499 gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h igen.h ld-insn.h
500 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
501
502 gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h igen.h ld-insn.h
503 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
504
505 dgen.o: dgen.c misc.h filter_filename.h lf.h table.h
506 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
507
508 igen.o: igen.c misc.h filter_filename.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-semantics.h gen-support.h igen.h
509 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
510
511 misc.o: misc.c misc.h filter_filename.h
512 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
513
514
515
516 # real hardware
517 tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
518 for hw in $(HW_SRC) ; do echo $$hw ; done \
519 | cat -n | sort +1 -u | sort -n \
520 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
521 -e 's/^/extern const device_descriptor /' \
522 -e 's/$$/_device_descriptor\[\];/' \
523 > tmp-hw.h
524 for hw in $(HW_SRC) ; do echo $$hw ; done \
525 | cat -n | sort +1 -u | sort -n \
526 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
527 -e 's/^/ /' \
528 -e 's/$$/_device_descriptor,/' \
529 > tmp-hw.c
530 $(srcdir)/../../move-if-change tmp-hw.h hw.h
531 $(srcdir)/../../move-if-change tmp-hw.c hw.c
532 touch tmp-hw
533
534 hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H)
535 hw_core.o: hw_core.c $(DEVICE_TABLE_H)
536 hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) pk.h
537 hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
538 hw_htab.o: hw_htab.c $(DEVICE_TABLE_H)
539 hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
540 hw_init.o: hw_init.c $(DEVICE_TABLE_H)
541 hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
542 hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
543 hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
544 hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
545 hw_pal.o: hw_pal.c $(DEVICE_TABLE_H)
546 hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) hw_phb.h
547 hw_register.o: hw_register.c $(DEVICE_TABLE_H)
548 hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
549 hw_vm.o: hw_vm.c $(DEVICE_TABLE_H)
550 # ignore this line, it stops make from getting confused
551
552
553
554 # real packages
555 tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
556 for pk in $(PACKAGE_SRC) ; do echo $$pk ; done \
557 | cat -n | sort +1 -u | sort -n \
558 | sed -e 's/^.*pk_\(.*\)\.c/\1/' \
559 -e 's/^/extern package_create_instance_callback pk_/' \
560 -e 's/$$/_create_instance;/' \
561 > tmp-pk.h
562 $(srcdir)/../../move-if-change tmp-pk.h pk.h
563 touch tmp-pk
564
565 pk_disklabel.o: pk.h $(DEVICE_TABLE_H)
566 # ignore this line, it stops make from getting confused
567
568
569
570 tags etags: TAGS
571
572 TAGS: $(BUILT_SRC)
573 etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
574
575 clean mostlyclean:
576 rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG)
577
578 distclean realclean: clean
579 rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
580
581 maintainer-clean: distclean
582 rm -f *~ *.log ppc-config.h core *.core
583
584 Makefile: Makefile.in config.status
585 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
586
587 config.h: stamp-h ; @true
588 stamp-h: config.in config.status
589 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
590
591 config.status: configure
592 $(SHELL) ./config.status --recheck
593
594 install:
595 $(INSTALL_XFORM) run $(bindir)/run
596