summaryrefslogtreecommitdiff
path: root/emulators/snes9x/files/patch-aa
blob: b86fedec824e3d88d98edb0e41240a4ae61fde6a (plain) (blame)
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
--- Makefile.orig	Wed Feb 28 12:29:58 2001
+++ Makefile	Sat Sep 28 20:50:19 2002
@@ -4,7 +4,6 @@
 #SPC700ASM=1
 NETPLAY=1
 UNZIP=1
-GLIDE=1
 #GUI=1
 THREAD_SOUND=1
 ASMKREED=1
@@ -81,11 +80,6 @@
 UNZIPDEFINES=-DUNZIP_SUPPORT
 endif
 
-ifdef THREAD_SOUND
-CPUDEFINES += -DUSE_THREADS
-EXTRALIBS += -lpthread
-endif
-
 ifdef GLIDE
 GLIDEOBJS = unix/glide.o
 GLIDEDEFINES = -DUSE_GLIDE -I/usr/include/glide
@@ -98,13 +92,13 @@
 endif
 
 MOC = $(QTDIR)/bin/moc
-CCC = g++ -fno-rtti
+CCC = $(CXX) -fno-rtti
 CC = gcc
 NASM = nasm
 
-INCLUDES=-I/usr/X11R6/include -I/usr/local/include
+INCLUDES=-I$(X11BASE)/include -I$(LOCALBASE)/include
 
-OPTIMISE= -O6 -mpentium -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe 
+OPTIMISE= $(CFLAGS) -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe 
 
 #OPTIMISE=-g -fno-exceptions
 #-DMITSHM 
@@ -119,6 +113,7 @@
 -DDEBUGGER \
 -DCPU_SHUTDOWN \
 -DSPC700_SHUTDOWN \
+-DSOUND \
 $(LINUXDEFINES) \
 $(FXDEFINES) \
 $(C4DEFINES) \
@@ -131,6 +126,11 @@
 $(KREEDDEFINES)
 #-DNO_INLINE_SET_GET
 
+ifdef USB_JOYSTICK_SUPPORT
+CCFLAGS += -DJOYSTICK_SUPPORT
+EXTRALIBS += -lusbhid
+endif
+
 #-DSOUND
 #-DDEBUGGER
 #-DNO_INLINE_SET_GET
@@ -138,12 +138,10 @@
 #-DCPU_SHUTDOWN
 #-DSPC700_SHUTDOWN
 
-CFLAGS=$(CCFLAGS)
-
 .SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj
-LDLIBS = -L/usr/X11R6/lib frame.o
+LDLIBS = -L$(X11BASE)/lib
 
-all: offsets snes9x ssnes9x
+all: offsets snes9x
 
 #ggisnes9x
 #xf86snes9x
@@ -165,7 +163,7 @@
 	./offsets >i386/offsets.h
 
 snes9x: $(OBJECTS) unix/x11.o $(GLIDEOBJS) $(GUIOBJS)
-	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm
+	$(CCC) $(INCLUDES) $(OPTIMISE) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm
 
 ssnes9x: $(OBJECTS) unix/svga.o $(GLIDEOBJS) 
 	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/svga.o $(LDLIBS) $(GLIDELIBS) -lvga -lvgagl -lz $(EXTRALIBS) -lm