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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
$NetBSD: patch-aa,v 1.16 1998/11/12 23:20:10 frueauf Exp $
--- makefile.unix.orig Wed Oct 21 08:20:43 1998
+++ makefile.unix Sun Oct 25 04:03:24 1998
@@ -39,7 +39,7 @@
# GNU MAKE is MANDATORY !!!
# so please give me the path...
# if GNU make is "native" use this
-MAKE = make
+MAKE = gmake
# else ...
# MAKE=/usr/people/jantonio/bin/gmake
@@ -106,18 +106,18 @@
# *** Select destination directory for your compiled program , manual page
# and binary distribution ( if you want to... )
# ( only needed to install, not to compile... )
-DESTDIR = /usr/games
-MANDIR = /usr/local/man/man6
+DESTDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man6
DISTDIR = /home/ftp/pub/emulators/$(NAME)
# *** Where the ROM source tree ?
-ROMPATH = \"/usr/games/lib/$(NAME)\"
+ROMPATH = \"${PREFIX}/share/$(NAME)\"
# *** Where to store high scores ?
-SDIR = \"/usr/games/lib/$(NAME)\"
+SDIR = \"${PREFIX}/share/$(NAME)\"
# *** Where resides global configuration file ?
-MRC = \"/usr/games/lib/$(NAME)/$(NAME)rc\"
+MRC = \"${PREFIX}/share/$(NAME)/$(NAME)rc\"
# *** Where is cheat.dat ?
CHEATFILE = \"/usr/games/lib/$(NAME)/cheat.dat\"
@@ -132,7 +132,9 @@
##############################################################################
# *** To enable joystick support uncomment next line
-# JOY = -DUSE_JOYSTICK
+ifeq (${NETBSD_JOYSTICK},yes)
+JOY = -DUSE_JOYSTICK
+endif
# if you have selected joystick support , select your preferences:
#
@@ -148,7 +150,9 @@
# JSLIB = -lXi
# On iX86 based OS's, if supported, you can use standard joystick driver
-# JS = -DI386_JOYSTICK
+ifeq (${NETBSD_JOYSTICK},yes)
+JS = -DI386_JOYSTICK
+endif
# Linux FM-TOWNS game PAD joystick emulation support
# Thanks to Osamu Kurati for provided patch
@@ -169,8 +173,8 @@
# you might decide to use these feature. Otherwise, you should use a
# timer based audio code and ajust in src/unix/sound.h AUDIO_TIMER_FREQ item
#
-S_TIM = -DDONTUSE_TIMER
-# S_TIM = -DUSE_TIMER
+# S_TIM = -DDONTUSE_TIMER
+S_TIM = -DUSE_TIMER
# *** When using timer, you should provide the frequency to generate audio sample
# frames in your system. See readme.unix notes about these item
@@ -223,7 +227,7 @@
# note: x11 is the only one supported on all platforms
### normal X11
-DISPLAY_METHOD = x11
+#DISPLAY_METHOD = x11
### XFree86's DGA extension, only tested under linux
#DISPLAY_METHOD = xf86_dga
### svgalib, only supported under linux
@@ -244,19 +248,23 @@
# uncomment following section to support them ( you should have libxpm
# available :-) )
# COMMENT IT if your are not compiling for normal x11
-# XPM = -DHAS_XPM
-# XPMLIB = -lXpm -L/usr/X11R6/lib
+ifeq (${DISPLAY_METHOD},x11)
+XPM = -DHAS_XPM
+XPMLIB = -lXpm -L/usr/X11R6/lib
+endif
# *** If you don't have the MIT-Shared Memory X Extensions, comment the
# following: ( Test if available by mean of xdpyinfo command )
+ifeq (${DISPLAY_METHOD},x11)
MSHM = -DUSE_MITSHM
+endif
# standard location for X11
# X11INC = -I/usr/include/X11
# X11LIB = -L/usr/lib/X11
# standard location for XFree86
-X11INC = -I/usr/X11R6/include
-X11LIB = -L/usr/X11R6/lib
+X11INC = -I${PREFIX}/include
+X11LIB = -L${PREFIX}/lib
# for Sun systems
# X11INC = -I/usr/openwin/include
# X11LIB = -L/usr/openwin/lib
@@ -273,11 +281,11 @@
# OpenGL include path
-GLINCPATH= /usr/src/Mesa-3.0/include
+GLINCPATH= ${PREFIX}/include
# OpenGL library path
-GLLIBPATH= /usr/src/Mesa-3.0/lib
+GLLIBPATH= ${PREFIX}/lib
# OpenGL libs
@@ -310,11 +318,12 @@
######## Alpha/Linux
# ARCH = linux_alpha
######## ix86/Linux
-ARCH = linux_i386
+# ARCH = linux_i386
######## ix86/FreeBSD and ix86/BSDi
# ARCH = FREEBSD
######## ix86/NetBSD
-# ARCH = netbsd_i386
+ARCH = netbsd
+MACHINE = $(shell uname -m)
######## Sparc/SunOS ( no sound )
# ARCH = sunos
######## ix86/Solaris
@@ -351,7 +360,11 @@
DEFS.linux_alpha = -Dlinux -DLSB_FIRST -DAXP_ASM -DACORN
DEFS.linux_i386 = -Dlinux -DLSB_FIRST -DX86_ASM
DEFS.FREEBSD = -DLSB_FIRST -DX86_ASM -Dlinux -DFREEBSD_SOUND_WORKAROUND
-DEFS.netbsd_i386 = -DLSB_FIRST -DX86_ASM -DNETBSD -DUSE_AUDIO
+ifeq (${MACHINE},i386)
+DEFS.netbsd = -DLSB_FIRST -DX86_ASM -DNETBSD -DUSE_AUDIO
+else
+DEFS.netbsd = -DLSB_FIRST -DACORN -DNETBSD -DUSE_AUDIO
+endif
DEFS.sunos = -Dsun -DCLOCKS_PER_SEC=1000000 -DACORN
DEFS.solaris = -Dsun -DACORN
DEFS.solaris_i386 = -DLSB_FIRST -Dsun -Dsolaris
@@ -371,12 +384,14 @@
LIBS.irix = -laudio
LIBS.irix_al = -laudio
LIBS.aix = -lUMSobj
+LIBS.netbsd = -lm
##############################################################################
# **** Architecture dependent cflags. Only change if you know what're you doing...
##############################################################################
CFLAGS.linux_powerpc = -fsigned-char
CFLAGS.aix = -I/usr/include/UMS -I/usr/lpp/som/include
+CFLAGS.netbsd = -fstrength-reduce -funroll-loops -fomit-frame-pointer
#############################################################################
# **** Display dependent libs. Only change if you know what're you doing...
|