summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/sdl.mak
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/sdl/sdl.mak')
-rw-r--r--src/osd/sdl/sdl.mak50
1 files changed, 34 insertions, 16 deletions
diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak
index c4391597417..e30dc4812ad 100644
--- a/src/osd/sdl/sdl.mak
+++ b/src/osd/sdl/sdl.mak
@@ -212,8 +212,11 @@ SYNC_IMPLEMENTATION = tc
SDL_NETWORK = taptun
ifndef NO_USE_MIDI
-INCPATH += `pkg-config --cflags alsa`
-LIBS += `pkg-config --libs alsa`
+ALSACFLAGS := $(shell pkg-config --cflags alsa)
+ALSALIBS := $(shell pkg-config --libs alsa)
+
+INCPATH += $(ALSACFLAGS)
+LIBS += $(ALSALIBS)
endif
endif
@@ -574,11 +577,14 @@ else
# files (header files are #include "SDL/something.h", so the extra "/SDL"
# causes a significant problem)
-INCPATH += `$(SDL_CONFIG) --cflags | sed 's:/SDL::'`
-CCOMFLAGS += -DNO_SDL_GLEXT
+SDLCFLAGS := $(shell $(SDL_CONFIG) --cflags | sed 's:/SDL::')
# Remove libSDLmain, as its symbols conflict with SDLMain_tmpl.m
-LIBS += `$(SDL_CONFIG) --libs | sed 's/-lSDLmain//'` -lpthread -framework Cocoa -framework OpenGL
-BASELIBS += `$(SDL_CONFIG) --libs | sed 's/-lSDLmain//'` -lpthread -framework Cocoa -framework OpenGL
+SDLLIBS := $(shell $(SDL_CONFIG) --libs | sed 's/-lSDLmain//')
+
+INCPATH += $(SDLCFLAGS)
+CCOMFLAGS += -DNO_SDL_GLEXT
+LIBS += $(SDLLIBS) -lpthread -framework Cocoa -framework OpenGL
+BASELIBS += $(SDLLIBS) -lpthread -framework Cocoa -framework OpenGL
DEFS += -DMACOSX_USE_LIBSDL
endif # MACOSX_USE_LIBSDL
@@ -617,11 +623,14 @@ ifeq ($(NO_X11),1)
NO_DEBUGGER = 1
endif
-INCPATH += `$(SDL_CONFIG) --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-D[^ ]*\)::g'`
-CCOMFLAGS += `$(SDL_CONFIG) --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-I[^ ]*\)::g'`
+SDLINCLUDES := $(shell $(SDL_CONFIG) --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-D[^ ]*\)::g')
+SDLDEFINES := $(shell $(SDL_CONFIG) --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-I[^ ]*\)::g')
+SDLLIBS := $(shell $(SDL_CONFIG) --libs)
-BASELIBS += `$(SDL_CONFIG) --libs`
-LIBS += `$(SDL_CONFIG) --libs`
+INCPATH += $(SDLINCLUDES)
+CCOMFLAGS += $(SDLDEFINES)
+BASELIBS += $(SDLLIBS)
+LIBS += $(SDLLIBS)
ifeq ($(SDL_LIBVER),sdl2)
ifdef SDL_INSTALL_ROOT
@@ -630,10 +639,13 @@ INCPATH += -I$(SDL_INSTALL_ROOT)/include/directfb
endif
endif
+FONTCONFIGCFLAGS := $(shell pkg-config --cflags fontconfig)
+FONTCONFIGLIBS := $(shell pkg-config --libs fontconfig)
+
ifneq ($(TARGETOS),emscripten)
-INCPATH += `pkg-config --cflags fontconfig`
+INCPATH += $(FONTCONFIGCFLAGS)
endif
-LIBS += `pkg-config --libs fontconfig`
+LIBS += $(FONTCONFIGLIBS)
ifeq ($(SDL_LIBVER),sdl2)
LIBS += -lSDL2_ttf
@@ -735,8 +747,11 @@ endif # Win32
ifeq ($(BASE_TARGETOS),os2)
-INCPATH += `sdl-config --cflags`
-LIBS += `sdl-config --libs` -lpthread
+SDLCFLAGS := $(shell sdl-config --cflags)
+SDLLIBS := $(shell sdl-config --libs)
+
+INCPATH += $(SDLCFLAGS)
+LIBS += $(SDLLIBS) -lpthread
endif # OS2
@@ -839,8 +854,11 @@ endif
# The newer debugger uses QT
ifndef NO_USE_QTDEBUG
-INCPATH += `pkg-config QtGui --cflags`
-LIBS += `pkg-config QtGui --libs`
+QTCFLAGS := $(shell pkg-config --cflags QtGui)
+QTLIBS := $(shell pkg-config --libs QtGui)
+
+INCPATH += $(QTCFLAGS)
+LIBS += $(QTLIBS)
endif
# some systems still put important things in a different prefix