summaryrefslogtreecommitdiff
path: root/games/frotz/patches/patch-aa
blob: 2cf26a9a389c7bb1d63acc47598d66d9b5093585 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
$NetBSD: patch-aa,v 1.6 2002/06/29 01:48:53 kristerw Exp $
--- Makefile.orig	Sun Mar 10 01:24:16 2002
+++ Makefile	Sat Jun 29 03:32:34 2002
@@ -1,7 +1,7 @@
 # Define your C compiler.  I recommend gcc if you have it.
 # MacOS users should use "cc" even though it's really "gcc".
 #
-CC = gcc
+CC ?= cc
 #CC = cc
 
 # Define your optimization flags.  Most compilers understand -O and -O2,
@@ -14,7 +14,7 @@
 
 # Define where you want Frotz to be installed.  Usually this is /usr/local
 #
-PREFIX = /usr/local
+#PREFIX = /usr/local
 #PREFIX =
 
 #Define where manpages should go.
@@ -24,7 +24,7 @@
 
 # Define where you want Frotz to look for frotz.conf.
 #
-CONFIG_DIR = /usr/local/etc
+CONFIG_DIR = ${PREFIX}/etc
 #CONFIG_DIR = /etc
 #CONFIG_DIR = /usr/pkg/etc
 #CONFIG_DIR =
@@ -36,16 +36,23 @@
 # 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
 
 # Also uncomment this if you want sound through the OSS driver.
 #
-#SOUND_LIB = -lossaudio
+SOUND_LIB = -lossaudio
+
+# Define your sound device
+# This should probably be a command-line/config-file option.
+#
+SOUND_DEV = /dev/sound
+#SOUND_DEV = /dev/dsp
+#SOUND_DEV = /dev/audio
 
 # 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${BUILDLINK_DIR}/include
 #INCL = -I/usr/pkg/include
 #INCL = -I/usr/freeware/include
 #INCL = -I/5usr/include
@@ -55,7 +62,7 @@
 # linking with.  Usually, this isn't necessary if /etc/ld.so.conf is set
 # up correctly.
 #
-LIB = -L/usr/local/lib
+LIB = -L${BUILDLINK_DIR}/lib -Wl,-R${PREFIX}/lib
 #LIB = -L/usr/pkg/lib
 #LIB = -L/usr/freeware/lib
 #LIB = -L/5usr/lib
@@ -86,7 +93,7 @@
 # Nothing under this line should need to be changed.
 #####################################################
 
-VERSION = 2.42
+VERSION = 2.42nb1
 
 BINNAME = frotz
 
@@ -103,17 +110,18 @@
 	ux_audio_none.o ux_audio_oss.o
 
 OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF) \
-	-DVERSION="\"$(VERSION)\""
+	-DVERSION="\"$(VERSION)\"" -DSOUND_DEV="\"$(SOUND_DEV)\""
 
 
 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)