Index: Makefile =================================================================== RCS file: /home/aa/projects/spim/public_html/cvsroot/spimsal/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- Makefile 2000/01/11 23:24:45 1.6 +++ Makefile 2002/05/15 21:35:55 @@ -45,6 +45,8 @@ RCSDIR=RCS +PREFIX=/Applications/spim + # # Note: SPIM does not work when compiled by a compiler that does # not distinguish floats from doubles (e.g., pcc and pcc-compatible compilers @@ -54,11 +56,7 @@ # Full path for the trap handler file: # You will want to change this. # -#TRAP_PATH = \"`pwd`/trap.handler\" -#TRAP_PATH = \"/u/scottk/cs354/spim/trap.handler\" -#TRAP_PATH = \"/usr/local/lib/spim/trap.handler\" -#TRAP_PATH = \"//u/cs61c/lib/spim/trap.handler\" -TRAP_PATH = \"/home/ff/cs61c/lib/spim/trap.handler\" +TRAP_PATH = \"$(PREFIX)/lib/spim/trap.handler\" # You don't need lex or flex if you have not wish to modify scanner.l. # If you have flex, use it instead of lex. If you use flex, define this @@ -76,7 +74,7 @@ # Location of X11 root directory. -TOPDIR = /usr/sww/X11R6 +TOPDIR = /usr/X11R6 # Size of the segments when spim starts up (data segment must be >= 64K). @@ -93,16 +91,16 @@ # # scottk@cs.wisc.edu # -SYS_FLAGS = -DTERMIO +SYS_FLAGS = # # End of parameters # # pnb - no need to put full path here, especially for win32 -CC = gcc +CC = cc -IFLAGS = -I/usr/sww/X11R6/include +IFLAGS = -I$(TOPDIR)/include CFLAGS = -gstabs+ $(IFLAGS) $(ENDIAN) $(MEM_SIZES) $(SYS_FLAGS) YFLAGS = -d YCFLAGS = @@ -110,7 +108,7 @@ # brg- add -R$(TOPDIR)/lib, on solaris. # It may also be necessary to add -lsocket -lnsl to link against certain # versions of X11. -XLDFLAGS = -L$(TOPDIR)/lib -R$(TOPDIR)/lib -lXaw -lXmu -lXt -lXext -lX11 #-lsocket -lnsl +XLDFLAGS = -L$(TOPDIR)/lib -lXaw -lXmu -lXt -lXext -lX11 #-lsocket -lnsl # lex.yy.c is usually compiled with -O to speed it up. @@ -140,6 +138,23 @@ spim.o: spim.h inst.h sym_tbl.h reg.h mem.h y.tab.h memio.h xspim.o: xspim.h spim.c spim.h reg.h mem.h y.tab.h windows.h buttons.h memio.h + + +.PHONY: install + +install: + -mkdir $(PREFIX) + -mkdir $(PREFIX)/bin + -mkdir $(PREFIX)/doc + -mkdir $(PREFIX)/lib + -mkdir $(PREFIX)/doc/spim + -mkdir $(PREFIX)/lib/spim + cp xspim $(PREFIX)/bin + cp spim $(PREFIX)/bin + chmod 755 $(PREFIX)/bin/xspim $(PREFIX)/bin/spim + cp BLURB.4.4 CHANGES.UCB COPYING INSTALL README RLOG Documents/[msx]* \ + $(PREFIX)/doc/spim + cp trap.handler trap.handler.reent $(PREFIX)/lib/spim spim-utils.o: spim.h inst.h mem.h reg.h y.tab.h data.h version.h \ Index: run.c =================================================================== RCS file: /home/aa/projects/spim/public_html/cvsroot/spimsal/run.c,v retrieving revision 1.3 diff -u -r1.3 run.c --- run.c 2000/01/11 23:03:46 1.3 +++ run.c 2002/05/15 21:18:04 @@ -777,7 +777,7 @@ PC = 0; return 0; } - RAISE_EXCEPTION(SYSCALL_EXCPT, /* null stmt */ ); + RAISE_EXCEPTION(SYSCALL_EXCPT, 0 ); steps++; } else { @@ -1160,7 +1160,7 @@ /* Test for interrupts. */ if ((Status_Reg & 1) && (Cause & Status_Reg & 0xff00)) - RAISE_EXCEPTION(INT_EXCPT, /* nada */); + RAISE_EXCEPTION(INT_EXCPT, 0); } if (exception_occurred) { Index: spim-utils.c =================================================================== RCS file: /home/aa/projects/spim/public_html/cvsroot/spimsal/spim-utils.c,v retrieving revision 1.5 diff -u -r1.5 spim-utils.c --- spim-utils.c 2001/04/23 23:23:13 1.5 +++ spim-utils.c 2002/05/15 21:15:43 @@ -260,7 +260,7 @@ #ifndef NOMEMIO #include "sys/ioctl.h" #ifdef TERMIO -#include "termio.h" +#include "termios.h" #else #include "sgtty.h" #endif /* TERMIO */