blob: ea5d10601d0adb059f54a109bbadf48bc4a3136b (
plain) (
blame)
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
51
52
53
54
55
56
57
58
|
--- spim/Makefile.orig 2010-01-09 14:22:57.000000000 +0900
+++ spim/Makefile 2010-01-17 01:44:59.000000000 +0900
@@ -66,13 +66,13 @@
# Full path for the directory that will hold the executable files:
-BIN_DIR = /usr/local/bin
+BIN_DIR = ${PREFIX}/bin
# Full path for the directory that will hold the exception handler:
-EXCEPTION_DIR = /usr/local/lib/spim
+EXCEPTION_DIR = ${PREFIX}/share/spim
# Full path for the directory that will hold the man files:
-MAN_DIR = /usr/local/man/en
+MAN_DIR = ${MANPREFIX}/man/man1
# If you have flex, use it instead of lex. If you use flex, define this
@@ -104,12 +104,12 @@
DEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_EXCEPTION_HANDLER="\"$(EXCEPTION_DIR)/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\""
-CC = gcc
-CFLAGS = -I. -I$(CPU_DIR) $(DEFINES) -g -Wall
-YFLAGS = -d --file-prefix=y
+CC ?= gcc
+CFLAGS += -I. -I$(CPU_DIR) $(DEFINES) -Wall
+YFLAGS = -d
YCFLAGS =
LDFLAGS = -lm
-CSH = bash
+CSH = csh
# lex.yy.c is usually compiled with -O to speed it up.
@@ -122,10 +122,10 @@
spim: force
- make -f Makefile spim2
+ $(MAKE) -f Makefile spim2
spim2: $(OBJS) spim.o
- $(CC) -g $(OBJS) spim.o $(LDFLAGS) -o spim -lm
+ $(CC) $(OBJS) spim.o $(LDFLAGS) -o spim -lm
force: configuration
@@ -211,7 +211,7 @@
y.tab.h: y.tab.c
y.tab.c: $(CPU_DIR)/parser.y
- bison $(YFLAGS) $(CPU_DIR)/parser.y
+ yacc $(YFLAGS) $(CPU_DIR)/parser.y
y.tab.o: y.tab.c
$(CC) $(CFLAGS) $(YCFLAGS) -c y.tab.c
|