$NetBSD: patch-ad,v 1.3 2011/02/05 13:38:15 ryoon Exp $ --- spim/Makefile.orig 2010-01-09 05:22:57.000000000 +0000 +++ spim/Makefile @@ -66,13 +66,13 @@ DOC_DIR = ../Documentation # Full path for the directory that will hold the executable files: -BIN_DIR = /usr/local/bin +BIN_DIR = $(DESTDIR)$(PREFIX)/bin # Full path for the directory that will hold the exception handler: -EXCEPTION_DIR = /usr/local/lib/spim +EXCEPTION_DIR = $(DESTDIR)$(PREFIX)/share/spim # Full path for the directory that will hold the man files: -MAN_DIR = /usr/local/man/en +MAN_DIR = $(DESTDIR)$(PREFIX)/$(PKGMANDIR)/man1 # If you have flex, use it instead of lex. If you use flex, define this @@ -104,9 +104,9 @@ ENDIAN=`cat configuration` DEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_EXCEPTION_HANDLER="\"$(EXCEPTION_DIR)/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\"" -CC = gcc +#CC = gcc CFLAGS = -I. -I$(CPU_DIR) $(DEFINES) -g -Wall -YFLAGS = -d --file-prefix=y +YFLAGS = -d # --file-prefix=y YCFLAGS = LDFLAGS = -lm CSH = bash @@ -120,6 +120,7 @@ LEXCFLAGS = -O $(CFLAGS) OBJS = spim-utils.o run.o mem.o inst.o data.o sym-tbl.o y.tab.o lex.yy.o \ syscall.o display-utils.o string-stream.o +all: spim spim: force make -f Makefile spim2 @@ -211,7 +212,7 @@ splint: spim y.tab.h: y.tab.c y.tab.c: $(CPU_DIR)/parser.y - bison $(YFLAGS) $(CPU_DIR)/parser.y + $(YACC) $(YFLAGS) $(CPUDIR)/parser.y y.tab.o: y.tab.c $(CC) $(CFLAGS) $(YCFLAGS) -c y.tab.c