summaryrefslogtreecommitdiff
path: root/emulators/snes9x/files/patch-aa
blob: 2fa126a69dcb86b50c8c3369df9e4ef0f1125411 (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
--- Makefile.orig	Mon Jan 24 16:15:50 2000
+++ Makefile	Wed Mar 15 02:23:16 2000
@@ -50,11 +50,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
@@ -66,24 +61,30 @@
 GLIDENO_DEPENDS=use_glide
 endif
 
-CCC = gcc
-CC = gcc
+CCC = $(CXX) -fno-rtti
+CC ?= gcc
 NASM = nasm
 
-INCLUDES=-I/usr/X11R6/include -I/usr/local/include
+ifdef THREAD_SOUND
+CPUDEFINES += -DUSE_THREADS
+CC += -pthread
+CCC += -pthread
+endif
+
+INCLUDES=-I${X11BASE}/include -I${LOCALBASE}/include
 
-OPTIMISE=-O6 -mpentium -fomit-frame-pointer -fno-exceptions
+OPTIMISE= $(CXXFLAGS)
 
 CCFLAGS = $(OPTIMISE) -DMITSHM \
 -Ii386 \
 -I. \
 -Iunzip \
--DJOYSTICK_SUPPORT \
 -DZLIB \
 -DNO_INLINE_SET_GET \
 -DVAR_CYCLES \
 -DCPU_SHUTDOWN \
 -DSPC700_SHUTDOWN \
+-DSOUND \
 $(LINUXDEFINES) \
 $(FXDEFINES) \
 $(CPUDEFINES) \
@@ -108,7 +109,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
 
 ifdef GLIDE
 ifdef NETPLAY
@@ -118,9 +119,9 @@
 endif
 else
 ifdef NETPLAY
-all: offsets snes9x ssnes9x s9xserver
+all: offsets snes9x s9xserver
 else
-all: offsets snes9x ssnes9x
+all: offsets snes9x
 endif
 endif