Add Spearmint portable SDL for Linux compile stuff

This commit is contained in:
Zack Middleton 2015-06-24 18:07:28 -05:00
parent 26ed99e851
commit 1aa91c52dc
2 changed files with 22 additions and 0 deletions

View file

@ -375,6 +375,12 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
CLIENT_LIBS=$(SDL_LIBS)
RENDERER_LIBS = $(SDL_LIBS) -lGL
ifeq ($(USE_PORTABLE_RPATH),1)
# $ is escaped using two, so this is litterly $ORIGIN
CLIENT_LIBS+=-Wl,-rpath,'$$ORIGIN/lib/$(ARCH)'
RENDERER_LIBS+=-Wl,-rpath,'$$ORIGIN/lib/$(ARCH)'
endif
ifeq ($(USE_OPENAL),1)
ifneq ($(USE_OPENAL_DLOPEN),1)
CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)

16
make-linux-portable.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 <arch>"
echo " arch can be x86 or x86_64"
exit 0
fi
ARCH=$1
SDL_PREFIX=/home/zack/Local/SDL-2.0.3/build-$ARCH
SDL_CFLAGS="`$SDL_PREFIX/bin/sdl2-config --cflags`"
SDL_LIBS="`$SDL_PREFIX/bin/sdl2-config --libs`"
make ARCH=$ARCH USE_PORTABLE_RPATH=1 SDL_CFLAGS="$SDL_CFLAGS" SDL_LIBS="$SDL_LIBS"