OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [sim/] [ppc/] [Makefile.in] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.