summaryrefslogtreecommitdiff
path: root/emulators/snes9x/patches/patch-aa
blob: c993510014507898cc922245754caac33071f808 (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
$NetBSD: patch-aa,v 1.2 2000/11/09 17:25:55 wiz Exp $

--- Makefile.orig	Mon Jan 24 16:15:50 2000
+++ Makefile
@@ -1,10 +1,10 @@
-ZSNESFX=1
-ASMCPU=1
+#ZSNESFX=1
+#ASMCPU=1
 #SPC700ASM=1
 NETPLAY=1
 UNZIP=1
 #GLIDE=1
-THREAD_SOUND=1
+#THREAD_SOUND=1
 
 ifdef ZSNESFX
 FXOBJ=i386/fxemu2b.o i386/fxemu2.o i386/fxemu2c.o i386/fxtable.o i386/sfxproc.o i386/zsnes.o
@@ -18,7 +18,10 @@
 FXNO_DEPENDS=zsnes_fx
 endif
 
+ifdef NETBSD_USE_DGA
 LINUXDEFINES=-DUSE_DGA_EXTENSION -DUSE_VIDMODE_EXTENSION
+DGALIBS=-lXxf86dga -lXxf86vm
+endif
 
 ifdef ASMCPU
 ifdef SPC700ASM
@@ -70,15 +73,14 @@
 CC = gcc
 NASM = nasm
 
-INCLUDES=-I/usr/X11R6/include -I/usr/local/include
+INCLUDES=-I${X11BASE}/include
 
-OPTIMISE=-O6 -mpentium -fomit-frame-pointer -fno-exceptions
+OPTIMISE=-fomit-frame-pointer -fno-exceptions
 
 CCFLAGS = $(OPTIMISE) -DMITSHM \
 -Ii386 \
 -I. \
 -Iunzip \
--DJOYSTICK_SUPPORT \
 -DZLIB \
 -DNO_INLINE_SET_GET \
 -DVAR_CYCLES \
@@ -108,7 +110,7 @@
 # system using the egcs compiler get an undefined __register_frame_info
 # symbol error when run on a Redhat box.
 
-LDLIBS = -L/usr/X11R6/lib frame.o
+LDLIBS = -L${X11BASE}/lib -Wl,-R${X11BASE}/lib
 
 ifdef GLIDE
 ifdef NETPLAY
@@ -118,9 +120,9 @@
 endif
 else
 ifdef NETPLAY
-all: offsets snes9x ssnes9x s9xserver
+all: offsets snes9x s9xserver
 else
-all: offsets snes9x ssnes9x
+all: offsets snes9x
 endif
 endif
 
@@ -140,7 +142,7 @@
 	./offsets >i386/offsets.h
 
 snes9x: $(OBJECTS) unix/x11.o
-	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/x11.o $(LDLIBS) -lXext -lX11 -lXxf86dga -lXxf86vm $(EXTRALIBS) -lz -lm
+	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/x11.o $(LDLIBS) -lXext -lX11 $(DGALIBS) $(EXTRALIBS) -lz -lm
 
 ssnes9x: $(OBJECTS) unix/svga.o
 	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/svga.o $(LDLIBS) -lvga -lvgagl $(EXTRALIBS) -lz -lm
@@ -170,7 +172,7 @@
 	$(CCC) $(INCLUDES) -c -E $(CCFLAGS) $*.S -o $@
 
 .asm.o:
-	$(NASM) -f elf -i . -i i386 -o $@ $*.asm
+	$(NASM) -f ${FILEFORMAT} -i . -i i386 -o $@ $*.asm
 
 clean:
 	rm -f $(OBJECTS) offsets.o unix/svga.o unix/x11.o unix/ggi.o unix/xf86.o