2015-06-24 23:07:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
2018-03-04 05:21:15 +00:00
|
|
|
echo "Usage: $0 <arch> [make options]"
|
2015-06-24 23:07:28 +00:00
|
|
|
echo " arch can be x86 or x86_64"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
ARCH=$1
|
2018-03-04 05:21:15 +00:00
|
|
|
SDL_PREFIX=/home/zack/Local/SDL-2.0.4/build-$ARCH
|
|
|
|
|
|
|
|
if [ ! -d $SDL_PREFIX ] ; then
|
|
|
|
echo "Change SDL_PREFIX in $0 to point to SDL build output"
|
|
|
|
exit 0
|
|
|
|
fi
|
2015-06-24 23:07:28 +00:00
|
|
|
|
|
|
|
SDL_CFLAGS="`$SDL_PREFIX/bin/sdl2-config --cflags`"
|
|
|
|
SDL_LIBS="`$SDL_PREFIX/bin/sdl2-config --libs`"
|
|
|
|
|
2018-03-04 05:21:15 +00:00
|
|
|
# Don't pass arch ($1) to make in $*
|
|
|
|
shift 1
|
|
|
|
|
|
|
|
make ARCH=$ARCH USE_PORTABLE_RPATH=1 SDL_CFLAGS="$SDL_CFLAGS" SDL_LIBS="$SDL_LIBS" $*
|
2015-06-24 23:07:28 +00:00
|
|
|
|
2018-03-04 05:21:15 +00:00
|
|
|
# Copy SDL lib to where spearmint will read it from
|
|
|
|
#mkdir -p build/release-linux-$ARCH/lib/$ARCH/
|
|
|
|
#cp $SDL_PREFIX/lib/libSDL2-2.0.so.0 build/release-linux-$ARCH/lib/$ARCH/
|