summaryrefslogtreecommitdiff
path: root/games/frotz/patches/patch-aa
blob: f294b6fe8b59f65ee1b2c90bb20999af83ad9ca1 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
$NetBSD: patch-aa,v 1.4 2002/01/22 02:13:02 hubertf Exp $

--- Makefile.orig	Sun May 20 23:16:39 2001
+++ Makefile
@@ -1,6 +1,6 @@
 #Define your C compiler.  I recommend gcc if you have it.
-CC = gcc
-#CC = cc
+#CC = gcc
+CC = cc
 
 # Define your optimization flags.  Most compilers understand -O and -O2,
 # Standard (note: Solaris on UltraSparc using gcc 2.8.x might not like this.)
@@ -10,42 +10,42 @@
 #-malign-jumps=2
 
 # Define where you want Frotz to be installed.  Usually this is /usr/local
-PREFIX = /usr/local
+#PREFIX = /usr/local
 #PREFIX =
 
 # Define where you want Frotz to look for frotz.conf.
-CONFIG_DIR = /usr/local/etc
+#CONFIG_DIR = /usr/local/etc
 #CONFIG_DIR = /etc
 #CONFIG_DIR = /usr/pkg/etc
-#CONFIG_DIR =
+CONFIG_DIR = ${PREFIX}/etc
 
 # Uncomment this if you want color support.  Usually this requires ncurses.
 COLOR_DEFS = -DCOLOR_SUPPORT
 
 # Uncomment this if you have an OSS soundcard driver and want classical
 # Infocom sound support.  Currently this works only for Linux.
-# SOUND_DEFS = -DOSS_SOUND
+SOUND_DEFS = -DOSS_SOUND
 
 # Uncomment the type of sound driver you want to use.
 # OSS
-#SOUND_LIB = -lossaudio
+SOUND_LIB = -lossaudio
 
 # This should point to the location of your curses.h or ncurses.h include
 # file if your compiler doesn't know about it.
-INCL = -I/usr/local/include
+#INCL = -I/usr/local/include
 #INCL = -I/usr/pkg/include
 #INCL = -I/usr/freeware/include
 #INCL = -I/5usr/include
-#INCL =
+INCL = -I${BUILDLINK_DIR}/include
 
 # This should define the location and name of whatever curses library you're
 # linking with.  Usually, this isn't necessary if /etc/ld.so.conf is set
 # up correctly.
-LIB = -L/usr/local/lib
+#LIB = -L/usr/local/lib
 #LIB = -L/usr/pkg/lib
 #LIB = -L/usr/freeware/lib
 #LIB = -L/5usr/lib
-#LIB =
+LIB = -L${BUILDLINK_DIR}/lib -Wl,-R${PREFIX}/lib
 
 # One of these must be uncommented, use ncurses if you have it. 
 CURSES = -lncurses	# Linux always uses ncurses.
@@ -85,11 +85,12 @@
 COMP_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \
 	$(MEMMOVE_DEF)
 
-CFLAGS = $(OPTS) $(COMP_DEFS) $(INCL)
+CFLAGS += $(OPTS) $(COMP_DEFS)
 
+all: frotz
 
 $(BINNAME): soundcard.h $(OBJECTS)
-	$(CC) -o $(BINNAME)$(EXTENSION) $(OBJECTS) $(LIB) $(CURSES) $(SOUND_LIB)
+	$(CC) -o $(BINNAME)$(EXTENSION) $(LDFLAGS) $(OBJECTS) $(LIB) $(CURSES) $(SOUND_LIB)
 
 all: $(BINNAME)