1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-04-10 17:03:35 +02:00

clean up sdlmame directory

This commit is contained in:
root
2015-06-22 17:16:04 +02:00
parent 1994389575
commit 83d3053e08
14 changed files with 563 additions and 366 deletions

View File

@@ -0,0 +1,79 @@
--- work.orig/makefile 2011-11-09 22:40:30.000000000 -0500
+++ work/makefile 2011-11-16 19:24:24.615419949 -0500
@@ -435,9 +435,6 @@
CPPONLYFLAGS += -x c++ -std=gnu++98
COBJFLAGS += -x objective-c++
-# this speeds it up a bit by piping between the preprocessor/compiler/assembler
-CCOMFLAGS += -pipe
-
# add -g if we need symbols, and ensure we have frame pointers
ifdef SYMBOLS
CCOMFLAGS += -g$(SYMLEVEL) -fno-omit-frame-pointer
@@ -442,7 +442,6 @@
# add -v if we need verbose build information
ifdef VERBOSE
-CCOMFLAGS += -v
endif
# add profiling information for the compiler
@@ -453,23 +450,6 @@
CCOMFLAGS += -pg
endif
-# add the optimization flag
-CCOMFLAGS += -O$(OPTIMIZE)
-
-# if we are optimizing, include optimization options
-# and make all errors into warnings
-ifneq ($(OPTIMIZE),0)
-ifneq ($(TARGETOS),os2)
-ifndef NOWERROR
-CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS)
-else
-CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
-endif
-else
-CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
-endif
-endif
-
# add a basic set of warnings
CCOMFLAGS += \
-Wall \
@@ -524,20 +504,6 @@
endif
-#-------------------------------------------------
-# linking flags
-#-------------------------------------------------
-
-# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
-# flags only used when linking the core emulator
-LDFLAGS =
-ifneq ($(TARGETOS),macosx)
-ifneq ($(TARGETOS),os2)
-ifneq ($(TARGETOS),solaris)
-LDFLAGS = -Wl,--warn-common
-endif
-endif
-endif
LDFLAGSEMULATOR =
# add profiling information for the linker
@@ -545,13 +511,6 @@
LDFLAGS += -pg
endif
-# strip symbols and other metadata in non-symbols and non profiling builds
-ifndef SYMBOLS
-ifneq ($(TARGETOS),macosx)
-LDFLAGS += -s
-endif
-endif
-
# output a map file (emulator only)
ifdef MAP
LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map

View File

@@ -0,0 +1,11 @@
--- ./src/osd/sdl/osdsdl.h.orig
+++ ./src/osd/sdl/osdsdl.h
@@ -225,6 +225,8 @@
const char *audio_driver() const { return value(SDLOPTION_AUDIODRIVER); }
#if USE_OPENGL
const char *gl_lib() const { return value(SDLOPTION_GL_LIB); }
+#else
+ const char *gl_lib() const { return NULL; }
#endif
private:

View File

@@ -0,0 +1,177 @@
--- makefile
+++ makefile
@@ -314,13 +314,14 @@
endif
# compiler, linker and utilities
-AR = @ar
-CC = @gcc
-LD = @g++
+AR ?= @ar
+CC ?= @gcc
+CXX ?= @g++
+LD = $(CXX)
MD = -mkdir$(EXE)
RM = @rm -f
OBJDUMP = @objdump
-PYTHON = @python
+PYTHON ?= @python
#-------------------------------------------------
@@ -455,7 +456,7 @@
# CFLAGS is defined based on C or C++ targets
# (remember, expansion only happens when used, so doing it here is ok)
-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)
+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS)
# we compile C-only to C89 standard with GNU extensions
# we compile C++ code to C++98 standard with GNU extensions
@@ -463,9 +464,6 @@
CPPONLYFLAGS += -x c++ -std=gnu++98
COBJFLAGS += -x objective-c++
-# this speeds it up a bit by piping between the preprocessor/compiler/assembler
-CCOMFLAGS += -pipe
-
# add -g if we need symbols, and ensure we have frame pointers
ifdef SYMBOLS
CCOMFLAGS += -g$(SYMLEVEL) -fno-omit-frame-pointer
@@ -479,19 +477,6 @@
# add profiling information for the compiler
ifdef PROFILE
CCOMFLAGS += -pg
-endif
-
-# add the optimization flag
-CCOMFLAGS += -O$(OPTIMIZE)
-
-# add the error warning flag
-ifndef NOWERROR
-CCOMFLAGS += -Werror
-endif
-
-# if we are optimizing, include optimization options
-ifneq ($(OPTIMIZE),0)
-CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
endif
# add a basic set of warnings
@@ -565,26 +550,11 @@
# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
# flags only used when linking the core emulator
-LDFLAGS =
-ifneq ($(TARGETOS),macosx)
-ifneq ($(TARGETOS),os2)
-ifneq ($(TARGETOS),solaris)
-LDFLAGS = -Wl,--warn-common
-endif
-endif
-endif
LDFLAGSEMULATOR =
# add profiling information for the linker
ifdef PROFILE
LDFLAGS += -pg
-endif
-
-# strip symbols and other metadata in non-symbols and non profiling builds
-ifndef SYMBOLS
-ifneq ($(TARGETOS),macosx)
-LDFLAGS += -s
-endif
endif
# output a map file (emulator only)
--- src/osd/sdl/sdl.mak
+++ src/osd/sdl/sdl.mak
@@ -24,6 +24,8 @@
# uncomment and edit next line to specify a distribution
# supported debian-stable, ubuntu-intrepid
+PKG_CONFIG ?= pkg-config
+
# DISTRO = debian-stable
# DISTRO = ubuntu-intrepid
# DISTRO = gcc44-generic
@@ -91,9 +93,9 @@
endif
ifdef SDL_INSTALL_ROOT
-SDL_CONFIG = $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
else
-SDL_CONFIG = $(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_LIBVER)-config
endif
ifeq ($(SDL_LIBVER),sdl2)
@@ -190,8 +192,8 @@
SDL_NETWORK = taptun
ifndef NO_USE_MIDI
-INCPATH += `pkg-config --cflags alsa`
-LIBS += `pkg-config --libs alsa`
+INCPATH += $(shell $(PKG_CONFIG) --cflags alsa)
+LIBS += $(shell $(PKG_CONFIG) --libs alsa)
endif
endif
@@ -476,10 +478,10 @@
# Remove the "/SDL" component from the include path so that we can compile
# files (header files are #include "SDL/something.h", so the extra "/SDL"
# causes a significant problem)
-INCPATH += `sdl-config --cflags | sed 's:/SDL::'`
+INCPATH += $(shell $(SDL_CONFIG) --cflags | sed 's:/SDL::')
CCOMFLAGS += -DNO_SDL_GLEXT
# Remove libSDLmain, as its symbols conflict with SDLMain_tmpl.m
-LIBS += `sdl-config --libs | sed 's/-lSDLmain//'` -lpthread
+LIBS += $(shell $(SDL_CONFIG) --libs | sed 's/-lSDLmain//') -lpthread
DEFS += -DMACOSX_USE_LIBSDL
endif # MACOSX_USE_LIBSDL
@@ -532,8 +534,8 @@
endif
endif
-INCPATH += `pkg-config --cflags fontconfig`
-LIBS += `pkg-config --libs fontconfig`
+INCPATH += $(shell $(PKG_CONFIG) --cflags fontconfig)
+LIBS += $(shell $(PKG_CONFIG) --libs fontconfig)
ifeq ($(SDL_LIBVER),sdl2)
LIBS += -lSDL2_ttf
@@ -616,8 +618,8 @@
ifeq ($(BASE_TARGETOS),os2)
-INCPATH += `sdl-config --cflags`
-LIBS += `sdl-config --libs`
+INCPATH += $(shell $(SDL_CONFIG) --cflags)
+LIBS += $(shell $(SDL_CONFIG) --libs)
endif # OS2
@@ -690,15 +692,15 @@
# the new debugger relies on GTK+ in addition to the base SDLMAME needs
# Non-X11 builds can not use the debugger
-INCPATH += `pkg-config --cflags-only-I gtk+-2.0` `pkg-config --cflags-only-I gconf-2.0`
-CCOMFLAGS += `pkg-config --cflags-only-other gtk+-2.0` `pkg-config --cflags-only-other gconf-2.0`
-LIBS += `pkg-config --libs gtk+-2.0` `pkg-config --libs gconf-2.0`
+INCPATH += $(shell $(PKG_CONFIG) --cflags-only-I gtk+-2.0 gconf-2.0)
+CCOMFLAGS += $(shell $(PKG_CONFIG) --cflags-only-other gtk+-2.0 gconf-2.0)
+LIBS += $(shell $(PKG_CONFIG) --libs gtk+-2.0 gconf-2.0)
#CCOMFLAGS += -DGTK_DISABLE_DEPRECATED
# The newer debugger uses QT
ifdef USE_QTDEBUG
-INCPATH += `pkg-config QtGui --cflags`
-LIBS += `pkg-config QtGui --libs`
+INCPATH += $(shell $(PKG_CONFIG) QtGui --cflags)
+LIBS += $(shell $(PKG_CONFIG) QtGui --libs)
endif
# some systems still put important things in a different prefix

View File

@@ -0,0 +1,12 @@
diff -Naur a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
--- a/src/osd/sdl/osdsdl.h 2012-07-11 20:49:55.070264487 +0200
+++ b/src/osd/sdl/osdsdl.h 2012-07-11 20:51:45.976264395 +0200
@@ -216,6 +216,8 @@
const char *audio_driver() const { return value(SDLOPTION_AUDIODRIVER); }
#if USE_OPENGL
const char *gl_lib() const { return value(SDLOPTION_GL_LIB); }
+#else
+ const char *gl_lib() const { return NULL; }
#endif
private:

View File

@@ -0,0 +1,191 @@
commit 938cfdf1f01bcc9ac736249ee6458a774d560738
Author: hasufell <hasufell@gentoo.org>
Date: Tue Jun 25 23:48:02 2013 +0200
QA: respect several environment variables
such as CC,CFLAGS,PKG_CONFIG...
diff --git a/makefile b/makefile
index ad6ae2d..dd4598d 100644
--- a/makefile
+++ b/makefile
@@ -317,13 +317,15 @@ BUILD_EXE = $(EXE)
endif
# compiler, linker and utilities
-AR = @ar
-CC = @gcc
-LD = @g++
+AR ?= @ar
+CC ?= @gcc
+CXX ?= @g++
+LD = $(CXX)
MD = -mkdir$(EXE)
RM = @rm -f
OBJDUMP = @objdump
-PYTHON = @python
+PYTHON ?= @python
+PKG_CONFIG ?= pkg-config
#-------------------------------------------------
@@ -458,7 +460,7 @@ CPPONLYFLAGS =
# CFLAGS is defined based on C or C++ targets
# (remember, expansion only happens when used, so doing it here is ok)
-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)
+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS)
# we compile C-only to C89 standard with GNU extensions
# we compile C++ code to C++98 standard with GNU extensions
@@ -466,9 +468,6 @@ CONLYFLAGS += -std=gnu89
CPPONLYFLAGS += -x c++ -std=gnu++98
COBJFLAGS += -x objective-c++
-# this speeds it up a bit by piping between the preprocessor/compiler/assembler
-CCOMFLAGS += -pipe
-
# add -g if we need symbols, and ensure we have frame pointers
ifdef SYMBOLS
CCOMFLAGS += -g$(SYMLEVEL) -fno-omit-frame-pointer
@@ -484,19 +483,6 @@ ifdef PROFILE
CCOMFLAGS += -pg
endif
-# add the optimization flag
-CCOMFLAGS += -O$(OPTIMIZE)
-
-# add the error warning flag
-ifndef NOWERROR
-CCOMFLAGS += -Werror
-endif
-
-# if we are optimizing, include optimization options
-ifneq ($(OPTIMIZE),0)
-CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
-endif
-
# add a basic set of warnings
CCOMFLAGS += \
-Wall \
@@ -576,14 +562,6 @@ endif
# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
# flags only used when linking the core emulator
-LDFLAGS =
-ifneq ($(TARGETOS),macosx)
-ifneq ($(TARGETOS),os2)
-ifneq ($(TARGETOS),solaris)
-LDFLAGS = -Wl,--warn-common
-endif
-endif
-endif
LDFLAGSEMULATOR =
# add profiling information for the linker
@@ -591,13 +569,6 @@ ifdef PROFILE
LDFLAGS += -pg
endif
-# strip symbols and other metadata in non-symbols and non profiling builds
-ifndef SYMBOLS
-ifneq ($(TARGETOS),macosx)
-LDFLAGS += -s
-endif
-endif
-
# output a map file (emulator only)
ifdef MAP
LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map
diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak
index 84332ef..36655d3 100644
--- a/src/osd/sdl/sdl.mak
+++ b/src/osd/sdl/sdl.mak
@@ -24,6 +24,8 @@
# uncomment and edit next line to specify a distribution
# supported debian-stable, ubuntu-intrepid
+PKG_CONFIG ?= pkg-config
+
# DISTRO = debian-stable
# DISTRO = ubuntu-intrepid
# DISTRO = gcc44-generic
@@ -88,9 +90,9 @@ SDL_LIBVER = sdl
endif
ifdef SDL_INSTALL_ROOT
-SDL_CONFIG = $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
else
-SDL_CONFIG = $(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_LIBVER)-config
endif
ifeq ($(SDL_LIBVER),sdl2)
@@ -187,8 +189,8 @@ SYNC_IMPLEMENTATION = tc
SDL_NETWORK = taptun
ifndef NO_USE_MIDI
-INCPATH += `pkg-config --cflags alsa`
-LIBS += `pkg-config --libs alsa`
+INCPATH += $(shell $(PKG_CONFIG) --cflags alsa)
+LIBS += $(shell $(PKG_CONFIG) --libs alsa)
endif
endif
@@ -478,10 +480,10 @@ else
# Remove the "/SDL" component from the include path so that we can compile
# files (header files are #include "SDL/something.h", so the extra "/SDL"
# causes a significant problem)
-INCPATH += `sdl-config --cflags | sed 's:/SDL::'`
+INCPATH += $(shell $(SDL_CONFIG) --cflags | sed 's:/SDL::')
CCOMFLAGS += -DNO_SDL_GLEXT
# Remove libSDLmain, as its symbols conflict with SDLMain_tmpl.m
-LIBS += `sdl-config --libs | sed 's/-lSDLmain//'` -lpthread
+LIBS += $(shell $(SDL_CONFIG) --libs | sed 's/-lSDLmain//') -lpthread
DEFS += -DMACOSX_USE_LIBSDL
endif # MACOSX_USE_LIBSDL
@@ -534,8 +536,8 @@ INCPATH += -I$(SDL_INSTALL_ROOT)/include/directfb
endif
endif
-INCPATH += `pkg-config --cflags fontconfig`
-LIBS += `pkg-config --libs fontconfig`
+INCPATH += $(shell $(PKG_CONFIG) --cflags fontconfig)
+LIBS += $(shell $(PKG_CONFIG) --libs fontconfig)
ifeq ($(SDL_LIBVER),sdl2)
LIBS += -lSDL2_ttf
@@ -620,8 +622,8 @@ endif # Win32
ifeq ($(BASE_TARGETOS),os2)
-INCPATH += `sdl-config --cflags`
-LIBS += `sdl-config --libs`
+INCPATH += $(shell $(SDL_CONFIG) --cflags)
+LIBS += $(shell $(SDL_CONFIG) --libs)
endif # OS2
@@ -696,14 +698,14 @@ LIBS += -lX11 -lXinerama
# The newer debugger uses QT
ifndef NO_USE_QTDEBUG
-INCPATH += `pkg-config QtGui --cflags`
-LIBS += `pkg-config QtGui --libs`
+INCPATH += $(shell $(PKG_CONFIG) QtGui --cflags)
+LIBS += $(shell $(PKG_CONFIG) QtGui --libs)
else
# the old-new debugger relies on GTK+ in addition to the base SDLMAME needs
# Non-X11 builds can not use the debugger
-INCPATH += `pkg-config --cflags-only-I gtk+-2.0` `pkg-config --cflags-only-I gconf-2.0`
-CCOMFLAGS += `pkg-config --cflags-only-other gtk+-2.0` `pkg-config --cflags-only-other gconf-2.0`
-LIBS += `pkg-config --libs gtk+-2.0` `pkg-config --libs gconf-2.0`
+INCPATH += $(shell $(PKG_CONFIG) --cflags-only-I gtk+-2.0 gconf-2.0)
+CCOMFLAGS += $(shell $(PKG_CONFIG) --cflags-only-other gtk+-2.0 gconf-2.0)
+LIBS += $(shell $(PKG_CONFIG) --libs gtk+-2.0 gconf-2.0)
endif
# some systems still put important things in a different prefix

View File

@@ -0,0 +1,28 @@
commit ec92ac2b0180b101c30748e62eb8b76cdf0cb439
Author: hasufell <hasufell@gentoo.org>
Date: Wed Jun 26 14:33:01 2013 +0200
remove unneeded linking
if we don't build the debugger, we don't want gtk+ linking
diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak
index 36655d3..2089707 100644
--- a/src/osd/sdl/sdl.mak
+++ b/src/osd/sdl/sdl.mak
@@ -696,6 +696,7 @@ else
DEFS += -DSDLMAME_X11
LIBS += -lX11 -lXinerama
+ifneq ($(NO_DEBUGGER),1)
# The newer debugger uses QT
ifndef NO_USE_QTDEBUG
INCPATH += $(shell $(PKG_CONFIG) QtGui --cflags)
@@ -707,6 +708,7 @@ INCPATH += $(shell $(PKG_CONFIG) --cflags-only-I gtk+-2.0 gconf-2.0)
CCOMFLAGS += $(shell $(PKG_CONFIG) --cflags-only-other gtk+-2.0 gconf-2.0)
LIBS += $(shell $(PKG_CONFIG) --libs gtk+-2.0 gconf-2.0)
endif
+endif # NO_DEBUGGER
# some systems still put important things in a different prefix
LIBS += -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib

View File

@@ -0,0 +1,19 @@
commit 6ee372b3693857372a7b4855039ad1a94d3aebca
Author: hasufell <hasufell@gentoo.org>
Date: Tue Jun 25 23:51:12 2013 +0200
fix for disabled opengl
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index ed0b66b..03d68f9 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -219,6 +219,8 @@ public:
const char *audio_driver() const { return value(SDLOPTION_AUDIODRIVER); }
#if USE_OPENGL
const char *gl_lib() const { return value(SDLOPTION_GL_LIB); }
+#else
+ const char *gl_lib() const { return NULL; }
#endif
private:

View File

@@ -0,0 +1,33 @@
commit ea514c9ded266aa365976649d88fa5593ef7ebf5
Author: hasufell <hasufell@gentoo.org>
Date: Tue Jun 25 23:48:26 2013 +0200
add switch to use system lua
diff --git a/makefile b/makefile
index dd4598d..bdf22d2 100644
--- a/makefile
+++ b/makefile
@@ -228,6 +228,9 @@ BUILD_JPEGLIB = 1
# uncomment next line to build PortMidi as part of MAME/MESS build
BUILD_MIDILIB = 1
+# uncomment next line to build Lua-5.2 as part of MAME/MESS build
+BUILD_LUA = 1
+
# uncomment next line to include the symbols
# SYMBOLS = 1
@@ -664,7 +667,12 @@ SOFTFLOAT = $(OBJ)/libsoftfloat.a
FORMATS_LIB = $(OBJ)/libformats.a
# add LUA library
+ifeq ($(BUILD_LUA),1)
LUA_LIB = $(OBJ)/liblua.a
+else
+LIBS += $(shell $(PKG_CONFIG) --libs lua)
+INCPATH += $(shell $(PKG_CONFIG) --cflags lua)
+endif
# add PortMidi MIDI library
ifeq ($(BUILD_MIDILIB),1)

View File

@@ -1,132 +0,0 @@
diff -ru work.orig/makefile work/makefile
--- work.orig/makefile 2015-03-11 18:38:24.955335239 -0700
+++ work/makefile 2015-03-11 18:39:03.870276079 -0700
@@ -363,14 +363,16 @@
# compiler, linker and utilities
ifneq ($(TARGETOS),emscripten)
-AR = @ar
-CC = @gcc
-LD = @g++
+AR ?= @ar
+CC ?= @gcc
+CXX ?= @g++
+LD = $(CXX)
endif
MD = -mkdir$(BUILD_EXE)
RM = @rm -f
OBJDUMP = @objdump
-PYTHON = @python
+PYTHON ?= @python
+PKG_CONFIG ?= pkg-config
#-------------------------------------------------
# form the name of the executable
@@ -523,7 +525,7 @@
# CFLAGS is defined based on C or C++ targets
# (remember, expansion only happens when used, so doing it here is ok)
-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS) $(INCPATH)
+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS) $(INCPATH)
# we compile C-only to C89 standard with GNU extensions
# we compile C++ code to C++98 standard with GNU extensions
@@ -535,9 +537,6 @@
endif
COBJFLAGS += -x objective-c++
-# this speeds it up a bit by piping between the preprocessor/compiler/assembler
-CCOMFLAGS += -pipe
-
# add -g if we need symbols, and ensure we have frame pointers
ifdef SYMBOLS
CCOMFLAGS += -g$(SYMLEVEL) -fno-omit-frame-pointer -fno-optimize-sibling-calls
@@ -564,22 +563,6 @@
CCOMFLAGS += -pg
endif
-# add the optimization flag
-CCOMFLAGS += -O$(OPTIMIZE)
-
-# add the error warning flag
-ifndef NOWERROR
-CCOMFLAGS += -Werror
-endif
-
-# if we are optimizing, include optimization options
-ifneq ($(OPTIMIZE),0)
-CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
-ifdef LTO
-CCOMFLAGS += -flto
-endif
-endif
-
ifdef SSE2
CCOMFLAGS += -msse2
endif
@@ -662,30 +645,11 @@
# linking flags
#-------------------------------------------------
-# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
-# flags only used when linking the core emulator
-LDFLAGS =
-ifneq ($(TARGETOS),macosx)
-ifneq ($(TARGETOS),os2)
-ifneq ($(TARGETOS),solaris)
-LDFLAGS = -Wl,--warn-common
-endif
-endif
-endif
-LDFLAGSEMULATOR =
-
# add profiling information for the linker
ifdef PROFILE
LDFLAGS += -pg
endif
-# strip symbols and other metadata in non-symbols and non profiling builds
-ifndef SYMBOLS
-ifneq ($(TARGETOS),macosx)
-LDFLAGS += -s
-endif
-endif
-
ifneq ($(OPTIMIZE),0)
ifdef LTO
LDFLAGS += -flto
diff -ru work.orig/src/osd/sdl/sdl.mak work/src/osd/sdl/sdl.mak
--- work.orig/src/osd/sdl/sdl.mak 2015-03-11 18:38:20.074217228 -0700
+++ work/src/osd/sdl/sdl.mak 2015-03-11 18:41:08.653292939 -0700
@@ -24,6 +24,8 @@
# uncomment and edit next line to specify a distribution
# supported debian-stable, ubuntu-intrepid
+PKG_CONFIG ?= pkg-config
+
# DISTRO = debian-stable
# DISTRO = ubuntu-intrepid
# DISTRO = gcc44-generic
@@ -107,9 +109,9 @@
endif
ifdef SDL_INSTALL_ROOT
-SDL_CONFIG = $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_INSTALL_ROOT)/bin/$(SDL_LIBVER)-config
else
-SDL_CONFIG = $(SDL_LIBVER)-config
+SDL_CONFIG ?= $(SDL_LIBVER)-config
endif
ifeq ($(SDL_LIBVER),sdl2)
@@ -761,8 +763,8 @@
#-------------------------------------------------
ifndef NO_USE_QTDEBUG
-$(OSDOBJ)/%.moc.c: $(OSDSRC)/%.h
- $(MOC) $(MOCINCPATH) $< -o $@
+INCPATH += $(shell $(PKG_CONFIG) QtGui --cflags)
+LIBS += $(shell $(PKG_CONFIG) QtGui --libs)
DEBUGOBJS = \
$(OSDOBJ)/modules/debugger/qt/debuggerview.o \

View File

@@ -1,19 +0,0 @@
diff -ru work.orig/src/osd/sdl/sdl.mak work/src/osd/sdl/sdl.mak
--- work.orig/src/osd/sdl/sdl.mak 2015-03-11 18:42:22.102068698 -0700
+++ work/src/osd/sdl/sdl.mak 2015-03-11 18:43:24.594579570 -0700
@@ -855,6 +855,7 @@
BASELIBS += -lX11
endif
+ifneq ($(NO_DEBUGGER),1)
# The newer debugger uses QT
ifndef NO_USE_QTDEBUG
QTCFLAGS := $(shell pkg-config --cflags QtGui)
@@ -863,6 +864,7 @@
INCPATH += $(QTCFLAGS)
LIBS += $(QTLIBS)
endif
+endif # NO_DEBUGGER
# some systems still put important things in a different prefix
LIBS += -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib

View File

@@ -1,30 +0,0 @@
diff -ru work.orig/src/osd/modules/font/font_sdl.c work/src/osd/modules/font/font_sdl.c
--- work.orig/src/osd/modules/font/font_sdl.c 2015-03-11 18:43:43.528037322 -0700
+++ work/src/osd/modules/font/font_sdl.c 2015-03-11 18:44:00.170439682 -0700
@@ -8,11 +8,7 @@
#if defined(SDLMAME_UNIX) && (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_SOLARIS)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
-#if (SDLMAME_SDL2)
-#include <SDL2/SDL_ttf.h>
-#else
#include <SDL/SDL_ttf.h>
-#endif
#ifndef SDLMAME_HAIKU
#include <fontconfig/fontconfig.h>
#endif
diff -ru work.orig/src/osd/sdl/sdl.mak work/src/osd/sdl/sdl.mak
--- work.orig/src/osd/sdl/sdl.mak 2015-03-11 18:43:43.526037273 -0700
+++ work/src/osd/sdl/sdl.mak 2015-03-11 18:44:00.170439682 -0700
@@ -649,11 +649,7 @@
endif
LIBS += $(FONTCONFIGLIBS)
-ifeq ($(SDL_LIBVER),sdl2)
-LIBS += -lSDL2_ttf
-else
LIBS += -lSDL_ttf
-endif
# FIXME: should be dealt with elsewhere
# libs that Haiku doesn't want but are mandatory on *IX