~ubuntu-branches/ubuntu/jaunty/spim/jaunty

« back to all changes in this revision

Viewing changes to MAKEFILE.DOS

  • Committer: Bazaar Package Importer
  • Author(s): Fernando Sanchez
  • Date: 2001-01-24 14:05:34 UTC
  • Revision ID: james.westby@ubuntu.com-20010124140534-3le9wmofforjjcd8
Tags: upstream-6.3
ImportĀ upstreamĀ versionĀ 6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
 
 
3
# SPIM S20 MIPS Simulator.
 
4
 
 
5
# Makefile for SPIM.
 
6
 
 
7
# Copyright (C) 1990-2000 by James Larus (larus@cs.wisc.edu).
 
8
 
 
9
# ALL RIGHTS RESERVED.
 
10
 
 
11
#
 
12
 
 
13
# DOS Makefile derived from Makefile.std by David A. Carley
 
14
 
 
15
#
 
16
 
 
17
# SPIM is distributed under the following conditions:
 
18
 
 
19
#
 
20
 
 
21
#   You may make copies of SPIM for your own use and modify those copies.
 
22
 
 
23
#
 
24
 
 
25
#   All copies of SPIM must retain my name and copyright notice.
 
26
 
 
27
#
 
28
 
 
29
#   You may not sell SPIM or distributed SPIM in conjunction with a commerical
 
30
 
 
31
#   product or service without the expressed written consent of James Larus.
 
32
 
 
33
#
 
34
 
 
35
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 
36
 
 
37
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 
38
 
 
39
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
40
 
 
41
# PURPOSE.
 
42
 
 
43
#
 
44
 
 
45
# $Header: $
 
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
51
#
 
52
 
 
53
# To make spim, type:
 
54
 
 
55
#
 
56
 
 
57
#   make spim
 
58
 
 
59
#
 
60
 
 
61
 
 
62
 
 
63
#
 
64
 
 
65
# To build a version of spim that doesn't need an external
 
66
 
 
67
# DPMI host (Windows, QEMM, Desqview, etc) type:
 
68
 
 
69
#
 
70
 
 
71
#   make pmode
 
72
 
 
73
#
 
74
 
 
75
# See the directions below regarding $(PMODESTUB)
 
76
 
 
77
 
 
78
 
 
79
#
 
80
 
 
81
# The following parameters must be set for the target machine:
 
82
 
 
83
#
 
84
 
 
85
 
 
86
 
 
87
# Full path for the trap handler file:
 
88
 
 
89
TRAP_PATH = \"trap.han\"
 
90
 
 
91
 
 
92
 
 
93
# If you have flex, use it instead of lex.  If you use flex, define this
 
94
 
 
95
# variable and set LEXFLAGS.
 
96
 
 
97
MYLEX = flex
 
98
 
 
99
 
 
100
 
 
101
# SPIM needs flex's -I flag since the scanner is used interactively.
 
102
 
 
103
# You can set the -8 flag so that funny characters do not hang the scanner.
 
104
 
 
105
LEXFLAGS = -I -8
 
106
 
 
107
 
 
108
 
 
109
# SPIM needs a DPMI server when compiled with DJGPP.
 
110
 
 
111
# PMODE/DJ can be found at:
 
112
 
 
113
#   ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/pmode11b.zip
 
114
 
 
115
PMODESTUB = e:\djgpp\bin\pmodstub.exe
 
116
 
 
117
 
 
118
 
 
119
# If you use lex, set the variables this way:
 
120
 
 
121
#MYLEX = lex
 
122
 
 
123
#LEXFLAGS =
 
124
 
 
125
 
 
126
 
 
127
 
 
128
 
 
129
# Size of the segments when spim starts up (data segment must be >= 64K).
 
130
 
 
131
# (These sizes are fine for most users since SPIM dynamically expands
 
132
 
 
133
# the memory as necessary.)
 
134
 
 
135
MEM_SIZES = -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536
 
136
 
 
137
 
 
138
 
 
139
# DOS and Windows platforms are little endian exclusively
 
140
 
 
141
ENDIAN=-DLITTLEENDIAN
 
142
 
 
143
 
 
144
 
 
145
#
 
146
 
 
147
# End of parameters
 
148
 
 
149
#
 
150
 
 
151
 
 
152
 
 
153
 
 
154
 
 
155
CC = gcc
 
156
 
 
157
IFLAGS =
 
158
 
 
159
CL_FLAG =
 
160
 
 
161
CFLAGS = -g $(IFLAGS) $(ENDIAN) $(MEM_SIZES) $(EXTRA_C_FLAGS) $(CL_FLAG)
 
162
 
 
163
YFLAGS = -d
 
164
 
 
165
YCFLAGS =
 
166
 
 
167
LDFLAGS = -lm
 
168
 
 
169
 
 
170
 
 
171
 
 
172
 
 
173
# lex.yy.c is usually compiled with -O to speed it up.
 
174
 
 
175
 
 
176
 
 
177
LEXCFLAGS = -O
 
178
 
 
179
 
 
180
 
 
181
 
 
182
 
 
183
OBJS = spim-utils.o run.o mem.o inst.o data.o sym-tbl.o y.tab.o lex.yy.o \
 
184
 
 
185
       mips-syscall.o
 
186
 
 
187
 
 
188
 
 
189
spim:   $(OBJS) spim.o
 
190
 
 
191
        $(CC) -g $(OBJS) spim.o $(LDFLAGS) -o spim -lm
 
192
 
 
193
        strip spim
 
194
 
 
195
        djp spim
 
196
 
 
197
 
 
198
 
 
199
pmode:  spim
 
200
 
 
201
        strip spim
 
202
 
 
203
        copy /b $(PMODESTUB) + spim spim.exe
 
204
 
 
205
 
 
206
 
 
207
clean:
 
208
 
 
209
        rm -f spim.exe spim *.o y.output
 
210
 
 
211
 
 
212
 
 
213
very-clean: clean
 
214
 
 
215
        rm -f y.tab.h y.tab.c lex.yy.c
 
216
 
 
217
 
 
218
 
 
219
SRC = spim-utils.c run.c mem.c inst.c data.c sym-tbl.c y.tab.o lex.yy.o \
 
220
 
 
221
       mips-syscall.c
 
222
 
 
223
 
 
224
 
 
225
 
 
226
 
 
227
#
 
228
 
 
229
# Dependences not handled well by makedepend:
 
230
 
 
231
#
 
232
 
 
233
 
 
234
 
 
235
spim-utils.o: spim-utils.c spim.h inst.h mem.h reg.h y.tab.h VERSION
 
236
 
 
237
        $(CC) $(CFLAGS) -DDEFAULT_TRAP_HANDLER=$(TRAP_PATH) \
 
238
 
 
239
        -DSPIM_VERSION="\"$(shell cat VERSION)\"" -c spim-utils.c
 
240
 
 
241
 
 
242
 
 
243
spim.o:
 
244
 
 
245
        $(CC) $(CFLAGS) -DDEFAULT_TRAP_HANDLER=$(TRAP_PATH) -c spim.c
 
246
 
 
247
 
 
248
 
 
249
y.tab.h: y.tab.c
 
250
 
 
251
 
 
252
 
 
253
y.tab.c: parser.y
 
254
 
 
255
        bison --yacc $(YFLAGS) parser.y --output=y.tab.c
 
256
 
 
257
 
 
258
 
 
259
y.tab.o: y.tab.c
 
260
 
 
261
        $(CC) $(IFLAGS) $(CFLAGS) $(YCFLAGS) -c y.tab.c
 
262
 
 
263
 
 
264
 
 
265
 
 
266
 
 
267
lex.yy.c: scanner.l
 
268
 
 
269
        $(MYLEX) -olex.yy.c $(LEXFLAGS) scanner.l
 
270
 
 
271
 
 
272
 
 
273
lex.yy.o: lex.yy.c
 
274
 
 
275
        $(CC) $(IFLAGS) $(LEXCFLAGS) -c lex.yy.c
 
276
 
 
277
 
 
278
 
 
279
 
 
280
 
 
281
#
 
282
 
 
283
# DO NOT DELETE THIS LINE -- make depend depends on it.
 
284
 
 
285
 
 
286
 
 
287
data.o: spim.h
 
288
 
 
289
data.o: spim-utils.h
 
290
 
 
291
data.o: inst.h
 
292
 
 
293
data.o: mem.h
 
294
 
 
295
data.o: reg.h
 
296
 
 
297
data.o: sym-tbl.h
 
298
 
 
299
data.o: parser.h
 
300
 
 
301
data.o: run.h
 
302
 
 
303
data.o: data.h
 
304
 
 
305
inst.o: spim.h
 
306
 
 
307
inst.o: spim-utils.h
 
308
 
 
309
inst.o: inst.h
 
310
 
 
311
inst.o: mem.h
 
312
 
 
313
inst.o: reg.h
 
314
 
 
315
inst.o: sym-tbl.h
 
316
 
 
317
inst.o: y.tab.h
 
318
 
 
319
inst.o: parser.h
 
320
 
 
321
inst.o: scanner.h
 
322
 
 
323
inst.o: data.h
 
324
 
 
325
inst.o: op.h
 
326
 
 
327
lex.yy.o: spim.h
 
328
 
 
329
lex.yy.o: spim-utils.h
 
330
 
 
331
lex.yy.o: inst.h
 
332
 
 
333
lex.yy.o: sym-tbl.h
 
334
 
 
335
lex.yy.o: y.tab.h
 
336
 
 
337
lex.yy.o: parser.h
 
338
 
 
339
lex.yy.o: scanner.h
 
340
 
 
341
lex.yy.o: op.h
 
342
 
 
343
mem.o: spim.h
 
344
 
 
345
mem.o: spim-utils.h
 
346
 
 
347
mem.o: inst.h
 
348
 
 
349
mem.o: mem.h
 
350
 
 
351
mem.o: reg.h
 
352
 
 
353
mips-syscall.o: spim.h
 
354
 
 
355
mips-syscall.o: inst.h
 
356
 
 
357
mips-syscall.o: mem.h
 
358
 
 
359
mips-syscall.o: reg.h
 
360
 
 
361
mips-syscall.o: sym-tbl.h
 
362
 
 
363
mips-syscall.o: spim-syscall.h
 
364
 
 
365
mips-syscall.o: mips-syscall.h
 
366
 
 
367
run.o: spim.h
 
368
 
 
369
run.o: spim-utils.h
 
370
 
 
371
run.o: inst.h
 
372
 
 
373
run.o: mem.h
 
374
 
 
375
run.o: reg.h
 
376
 
 
377
run.o: sym-tbl.h
 
378
 
 
379
run.o: y.tab.h
 
380
 
 
381
run.o: mips-syscall.h
 
382
 
 
383
run.o: run.h
 
384
 
 
385
spim-utils.o: spim.h
 
386
 
 
387
spim-utils.o: spim-utils.h
 
388
 
 
389
spim-utils.o: inst.h
 
390
 
 
391
spim-utils.o: data.h
 
392
 
 
393
spim-utils.o: mem.h
 
394
 
 
395
spim-utils.o: reg.h
 
396
 
 
397
spim-utils.o: scanner.h
 
398
 
 
399
spim-utils.o: parser.h
 
400
 
 
401
spim-utils.o: y.tab.h
 
402
 
 
403
spim-utils.o: run.h
 
404
 
 
405
spim-utils.o: sym-tbl.h
 
406
 
 
407
spim.o: spim.h
 
408
 
 
409
spim.o: spim-utils.h
 
410
 
 
411
spim.o: inst.h
 
412
 
 
413
spim.o: mem.h
 
414
 
 
415
spim.o: reg.h
 
416
 
 
417
spim.o: parser.h
 
418
 
 
419
spim.o: sym-tbl.h
 
420
 
 
421
spim.o: scanner.h
 
422
 
 
423
spim.o: y.tab.h
 
424
 
 
425
sym-tbl.o: spim.h
 
426
 
 
427
sym-tbl.o: spim-utils.h
 
428
 
 
429
sym-tbl.o: inst.h
 
430
 
 
431
sym-tbl.o: mem.h
 
432
 
 
433
sym-tbl.o: data.h
 
434
 
 
435
sym-tbl.o: parser.h
 
436
 
 
437
sym-tbl.o: sym-tbl.h
 
438
 
 
439
y.tab.o: spim.h
 
440
 
 
441
y.tab.o: spim-utils.h
 
442
 
 
443
y.tab.o: inst.h
 
444
 
 
445
y.tab.o: mem.h
 
446
 
 
447
y.tab.o: reg.h
 
448
 
 
449
y.tab.o: sym-tbl.h
 
450
 
 
451
y.tab.o: data.h
 
452
 
 
453
y.tab.o: scanner.h
 
454
 
 
455
y.tab.o: parser.h
 
456
 
 
457
parser.o: spim.h
 
458
 
 
459
parser.o: spim-utils.h
 
460
 
 
461
parser.o: inst.h
 
462
 
 
463
parser.o: mem.h
 
464
 
 
465
parser.o: reg.h
 
466
 
 
467
parser.o: sym-tbl.h
 
468
 
 
469
parser.o: data.h
 
470
 
 
471
parser.o: scanner.h
 
472
 
 
473
parser.o: parser.h
 
474
 
 
475
scanner.o: spim.h
 
476
 
 
477
scanner.o: spim-utils.h
 
478
 
 
479
scanner.o: inst.h
 
480
 
 
481
scanner.o: sym-tbl.h
 
482
 
 
483
scanner.o: y.tab.h
 
484
 
 
485
scanner.o: parser.h
 
486
 
 
487
scanner.o: scanner.h
 
488
 
 
489
scanner.o: op.h
 
490