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