summaryrefslogtreecommitdiff
path: root/emulators/mess/files/patch-makefile.sdl
blob: d892918261fd1ab73add6441570297f1cbddbfab (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
84
--- makefile.sdl.orig	Fri Aug 31 10:41:30 2007
+++ makefile.sdl	Fri Aug 31 11:22:15 2007
@@ -66,11 +66,13 @@
 # uncomment next line to include the debugger
 # DEBUG = 1
 
+ifeq ($(ARCH),i386)
 # uncomment next line to use DRC MIPS3 engine
 X86_MIPS3_DRC = 1
 
 # uncomment next line to use DRC PowerPC engine
 X86_PPC_DRC = 1
+endif
 
 # uncomment next line to use DRC Voodoo rasterizers
 # X86_VOODOO_DRC = 1
@@ -96,7 +98,9 @@
 # CELL = 1
 
 # uncomment next line if you are building for a 64-bit target
-# PTR64 = 1
+ifeq ($(ARCH),amd64)
+PTR64 = 1
+endif
 
 # uncomment next line to build expat as part of MAME build
 BUILD_EXPAT = 1
@@ -160,8 +164,8 @@
 
 # compiler, linker and utilities
 AR = @ar
-CC = @gcc
-LD = @gcc
+CC := @$(CC)
+LD = @$(CC)
 HHC = @-hhc
 MD = -mkdir$(EXE)
 RM = @rm -f
@@ -258,8 +262,8 @@
 endif
 
 # fullname is prefix+name+suffix
-FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)
-FULLGUINAME = $(PREFIX)$(NAME)gui$(SUFFIX)
+FULLNAME = $(NAME)
+FULLGUINAME = $(NAME)gui
 
 # add an EXE suffix to get the final emulator name
 EMULATORCLI = $(FULLNAME)$(EXE)
@@ -325,7 +329,7 @@
 #-------------------------------------------------
 
 # we compile to C89 standard with GNU extensions
-CFLAGS = -std=gnu89
+CFLAGS += -std=gnu89
 
 # add -g if we need symbols
 ifdef SYMBOLS
@@ -356,7 +360,7 @@
 # and make all errors into warnings
 # but not on 64-bit or debug builds
 ifneq ($(OPTIMIZE),0)
-CFLAGS += $(ARCH) -fno-strict-aliasing
+CFLAGS += -fno-strict-aliasing
 
 # only -Werror if not PTR64 and not DEBUG
 ifndef PTR64
@@ -397,6 +401,7 @@
 	-I$(SRC)/lib/util \
 	-I$(SRC)/osd \
 	-I$(SRC)/osd/$(OSD) \
+        -I$(LOCALBASE)/include
 
 ifdef MESS
 CFLAGS += \
@@ -412,7 +417,7 @@
 
 # LDFLAGS are used generally; LDFLAGSEMULATOR are additional
 # flags only used when linking the core emulator
-LDFLAGS = 
+LDFLAGS += -L$(LOCALBASE)/lib 
 LDFLAGSEMULATOR =
 
 # strip symbols and other metadata in non-symbols builds