$NetBSD: patch-aa,v 1.24 2000/07/13 20:54:04 martin Exp $
--- makefile.unix.orig	Fri Jun 23 12:05:25 2000
+++ makefile.unix	Wed Jul 12 23:55:46 2000
@@ -138,13 +138,13 @@
 # *** 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
 
 # *** xmameroot, this is the default rompath, place where the highscores are
 # stored, global rc location etc. Since most of these are configurable through
 # the rc-file anyway, there are no longer seperate defines for each.
-XMAMEROOT = /usr/games/lib/x$(TARGET)
+XMAMEROOT = ${PREFIX}/share/xmame
 
 
 ##############################################################################
@@ -152,7 +152,7 @@
 ##############################################################################
 
 ### i386 + gnu-asm
-MY_CPU = i386
+MY_CPU = ${MAME_CPU}
 ### i386 no asm
 # MY_CPU = i386_noasm
 ### alpha
@@ -171,11 +171,11 @@
 ##############################################################################
 
 ### Linux 
-ARCH  = linux
+# ARCH  = linux
 ### FreeBSD
 # ARCH  = freebsd
 ### NetBSD
-# ARCH  = netbsd
+ARCH  = netbsd
 ### Solaris / SunOS
 # ARCH  = solaris
 ### OpenStep
@@ -207,6 +207,9 @@
 # JOY_I386 = 1
 # Linux FM-TOWNS game PAD joystick emulation support, thanks to Osamu Kurati
 # JOY_PAD = 1
+ifeq (${NETBSD_JOYSTICK},yes)
+JOY_I386 = 1
+endif
 
 
 ##############################################################################
@@ -249,7 +252,10 @@
 # MIT-Shared Memory X Extensions, comment the
 X11_MITSHM = 1
 # XFree86 DGA
-# X11_DGA = 1
+ifeq (${NETBSD_DGA},yes)  
+X11_DGA = 1
+endif
+
 # The XIL library (Solaris 2.5.1 and higher), uncomment
 # X11_XIL = 1
 
@@ -258,8 +264,8 @@
 # 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 -Wl,-R${PREFIX}/lib
 # for Sun systems
 # X11INC		= -I/usr/openwin/include
 # X11LIB		= -L/usr/openwin/lib