head     1.7;
branch   ;
access   ;
symbols  ;
locks    egs:1.7; strict;
comment  @# @;


1.7
date     92.07.08.14.54.02;  author egs;  state Exp;
branches ;
next     1.6;

1.6
date     92.06.26.00.03.21;  author egs;  state Exp;
branches ;
next     1.5;

1.5
date     92.06.22.14.04.35;  author egs;  state Exp;
branches ;
next     1.4;

1.4
date     92.06.15.14.11.42;  author egs;  state Exp;
branches ;
next     1.3;

1.3
date     92.06.11.12.38.35;  author egs;  state Exp;
branches ;
next     1.2;

1.2
date     92.06.04.13.48.18;  author egs;  state Exp;
branches ;
next     1.1;

1.1
date     92.05.27.16.35.44;  author egs;  state Exp;
branches ;
next     ;


desc
@mkfile
@


1.7
log
@*** empty log message ***
@
text
@# Note: SPIM does not work when compiled by a compiler that does
# not distinguish floats from doubles (e.g., pcc and pcc-compatible compilers
# on the VAX).

# Endianness
# BIGENDIAN (e.g. 68000's (i.e. Sun 3, HP Bobcats), RT/PC, SPARC, MIPSebs)
# LITTLEENDIAN (e.g. DECstation, Sequent Symmetry),
ENDIAN=-DLITTLEENDIAN

# Use tt.be for big-endian systems
# Use tt.le for little-endian systems:
TEST_FILE = tt.le

# If you have flex, use it instead of lex.  If you use flex, define this
# variable and set LEXFLAGS.
#MYLEX = flex

# SPIM needs the -I flag to flex since the scanner is used interactively.
# You can set the -8 flag so that funny characters do not hang the scanner.
#LEXFLAGS = -I -8

# If you use lex, set the variables this way:
MYLEX = lex
LEXFLAGS =

# Location of X11 root directory.
TOPDIR = /usr/X11/

# Size of the segments when spim starts up (data segment must be >= 64K).
MEM_SIZES =

# Define these flags if your operating system libraries are missing these:
#
# -DNEED_VSPRINTF   If your system doesn't have vsprintf
# -DNEED_STRTOL     If your system doesn't have strtol
#
#Ultrix, SunOS: no flags.
#Sequent: both
#PC/RT:	  -DNEED_VSPRINTF
#BSD4.3:  -DNEED_STRTOL
SYS_FLAGS=

CC=lcc
IFLAGS= 
CFLAGS= -g $IFLAGS $ENDIAN $MEM_SIZES $SYS_FLAGS
YFLAGS= -d
YCFLAGS=
LDFLAGS=
XLDFLAGS= -L$TOPDIR/lib -lXaw -lXmu -lXt -lXext -lX11
LEXCFLAGS=

OBJS = spim-utils.o run.o mem.o inst.o data.o sym_tbl.o y.tab.o lex.yy.o \
       read-aout.o except.o cache.o mips-syscall.o
XOBJS = windows.o buttons.o

#all: spim xspim

spim:	$OBJS spim.o
	$CC -g $prereq $LDFLAGS -o spim -lm
xspim:	$OBJS $XOBJS xspim.o
	$CC -g $prereq $LDFLAGS $XLDFLAGS -o xspim -lm
spim.o:	spim.c spim.h reg.h mem.h x.tab.h
xspim.o: xspim.c xspim.h spim.c spim.h reg.h mem.h x.tab.h
spim-utils.o: spim-utils.c spim.h inst.h mem.h reg.h x.tab.h VERSION
	$CC $IFLAGS $CFLAGS -DSPIM_VERSION=\"5.0\" -c spim-utils.c
run.o:	run.c spim.h reg.h x.tab.h inst.h mem.h sym_tbl.h
mips-syscall.o:	mips-syscall.c spim.h inst.h mem.h reg.h spim-syscall.h mips-syscall.h
except.o: except.c spim.h reg.h inst.h mem.h sym_tbl.h spim-syscall.h mips-syscall.h
mem.o:	     mem.c spim.h reg.h inst.h mem.h
cache.o:     cache.c reg.h inst.h mem.h
inst.o:      inst.c spim.h reg.h inst.h mem.h sym_tbl.h x.tab.h op.h
data.o:      data.c spim.h mem.h reg.h sym_tbl.h
sym_tbl.o:   sym_tbl.c spim.h inst.h mem.h sym_tbl.h
read_aout.o: read_aout.c inst.h mem.h

x.tab.h:Pcmp -s:y.tab.h
	cp y.tab.h x.tab.h
y.tab.c y.tab.h: parser.y spim.h inst.h mem.h reg.h sym_tbl.h
	yacc $YFLAGS parser.y
y.tab.o: y.tab.c
	$CC $IFLAGS $CFLAGS $YCFLAGS -c y.tab.c

lex.yy.c: scanner.l x.tab.h op.h
	$MYLEX $LEXFLAGS scanner.l
lex.yy.o: lex.yy.c
	$CC $IFLAGS $LEXCFLAGS -c lex.yy.c
windows.o:  windows.c xspim.h
buttons.o:  buttons.c xspim.h

clean:V:
	rm -f *.o *~ y.output core a.out spim.tar.* spim.shar* x.tab.h y.tab.h y.tab.c lex.yy.c
clobber:V:clean
	rm -f spim xspim

FILES= BLURB README COPYING Makefile *.c *.h *.y *.l trap.handler Tests/tt.* \
	ChangeLog VERSION mips.id xinterface.id mem.id stack-frame.id
TAGS:	*.c *.h *.l *.y
	etags *.l *.y *.c *.h
tar:V: clean
	cd ..
	tar cvf spim.tar spim
tar.Z:V:	tar
	compress ../spim.tar
shar:V: clean
	cd ..
	shar spim >spim.shar
@


1.6
log
@*** empty log message ***
@
text
@d43 2
a44 2
CC= gcc
IFLAGS= -I$TOPDIR
@


1.5
log
@got rid of the trap handler for spim-utils.x
@
text
@d43 1
a43 1
CC= lcc
@


1.4
log
@added support for mips-syscall.c
added clobber
@
text
@a3 2
# Full path for the trap handler file:
TRAP_PATH = \"`pwd`/trap.handler\"
d65 1
a65 1
	$CC $IFLAGS $CFLAGS -DDEFAULT_TRAP_HANDLER=$TRAP_PATH -DSPIM_VERSION=\"5.0\" -c spim-utils.c
@


1.3
log
@*** empty log message ***
@
text
@d55 1
a55 1
       read-aout.o except.o cache.o
d68 2
a69 1
run.o:	run.c spim.h reg.h x.tab.h inst.h mem.h sym_tbl.h spim-syscall.h mips-syscall.h
d93 3
a95 1
	rm -f spim xspim *.o y.output core a.out TAGS spim.tar.* spim.shar* *~ x.tab.h y.tab.h y.tab.c lex.yy.c
@


1.2
log
@Cleaned up parser dependencies.
@
text
@d32 1
a32 1
MEM_SIZES = -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536
@


1.1
log
@Initial revision
@
text
@d39 4
a42 4
# Note: Ultrix and SunOS do not need any flags.
#       Sequent requires both flags.
#	PC/RTs requires -DNEED_VSPRINTF
#	BSD4.3 requires -DNEED_STRTOL
d45 1
a45 1
CC= cc
d52 1
a52 1
LEXCFLAGS = -O
d67 1
a67 1
	$CC $IFLAGS $CFLAGS -DDEFAULT_TRAP_HANDLER=$TRAP_PATH -DSPIM_VERSION="0" -c spim-utils.c
d71 1
a71 1
cache.o:     cache.c reg.h inst.h mem.h cache.h
d77 2
a78 2
x.tab.h: y.tab.h
	cmp -s x.tab.h y.tab.h || cp y.tab.h x.tab.h
@
