aboutsummaryrefslogtreecommitdiff
path: root/emulators/mame-devel/files/patch-makefile
blob: d839b1ec02cad0fefc4d0771b417ecc36f296803 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--- makefile.orig	Thu Apr 12 22:01:33 2007
+++ makefile	Sat Apr 21 13:20:41 2007
@@ -63,11 +63,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
 
 #-------------------------------------------------
 # specify build options; see each option below 
@@ -174,8 +176,8 @@
 
 # compiler, linker and utilities
 AR = @ar
-CC = @gcc
-LD = @gcc
+CC := @$(CC)
+LD = @$(CC)
 MD = -mkdir
 RM = @rm -f
 
@@ -191,53 +193,12 @@
 endif
 
 # by default, don't compile for a specific target CPU
-NAME = $(PREFIX)$(TARGET)
-ARCH = 
-
-# architecture-specific builds get extra options
-ifdef ATHLON
-NAME = $(PREFIX)$(TARGET)at
-ARCH = -march=athlon
-endif
-
-ifdef I686
-NAME = $(PREFIX)$(TARGET)pp
-ARCH = -march=pentiumpro
-endif
-
-ifdef P4
-NAME = $(PREFIX)$(TARGET)p4
-ARCH = -march=pentium4
-endif
-
-ifdef AMD64
-NAME = $(PREFIX)$(TARGET)64
-ARCH = -march=athlon64
-endif
-
-ifdef PM
-NAME = $(PREFIX)$(TARGET)pm
-ARCH = -march=pentium3 -msse2
-endif
-
-ifdef G4
-NAME = $(PREFIX)$(TARGET)g4
-ARCH = -mcpu=G4
-endif
-
-ifdef G5
-NAME = $(PREFIX)$(TARGET)g5
-ARCH = -mcpu=G5
-endif
-
-ifdef CELL
-NAME = $(PREFIX)$(TARGET)cbe
+NAME = $(TARGET)
 ARCH = 
-endif
 
 # debug builds just get the 'd' suffix and nothing more
 ifdef DEBUG
-NAME = $(PREFIX)$(TARGET)d
+NAME = $(TARGET)d
 endif
 
 EMULATOR = $(NAME)$(EXE)
@@ -275,7 +236,7 @@
 # compile and linking flags
 #-------------------------------------------------
 
-CFLAGS = \
+CFLAGS += \
 	$(OPT_FLAGS) \
 	-std=gnu89 \
 	-I$(SRC)/$(TARGET) \
@@ -287,6 +248,7 @@
 	-I$(SRC)/lib/util \
 	-I$(SRC)/osd \
 	-I$(SRC)/osd/$(MAMEOS) \
+	-I$(LOCALBASE)/include -I$(X11BASE)/include
 
 ifdef MESS
 CFLAGS += \
@@ -305,7 +267,7 @@
 endif	# PPC
 endif	# SYMBOLS
 
-CFLAGS += $(ARCH) \
+CFLAGS += \
 	-Wall \
 	-Wpointer-arith \
 	-Wbad-function-cast \
@@ -317,7 +279,7 @@
 	-Wdeclaration-after-statement
 
 ifneq ($(OPTIMIZE),0)
-CFLAGS += -DNDEBUG $(ARCH) -fno-strict-aliasing
+CFLAGS += -DNDEBUG -fno-strict-aliasing
 endif
 
 CFLAGS += -O$(OPTIMIZE)
@@ -325,11 +287,9 @@
 # extra options needed *only* for the osd files
 CFLAGSOSDEPEND = $(CFLAGS)
 
-LDFLAGS = -WO
+LDFLAGS += -WO -L$(LOCALBASE)/lib -L$(X11BASE)/lib
 
-ifdef SYMBOLS
-LDFLAGS = 
-else
+ifndef SYMBOLS
 LDFLAGS += -s
 endif