blob: 0e534e7fbd33351af0da6b237962e2036f4e3def (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
$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
|