Skip to content

Commit

Permalink
Add sdl-config script to make porting easier
Browse files Browse the repository at this point in the history
-Requires setting the path to sdl-config like ./configure --width-sdl-exec-path=`nspire-tools path`
  • Loading branch information
Vogtinator committed Feb 24, 2015
1 parent bcbede7 commit 025f272
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions ndless-sdk/bin/sdl-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh

prefix=`nspire-tools path`
exec_prefix=`nspire-tools path`/bin
exec_prefix_set=no
libdir=`nspire-tools path`/lib

usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
#usage="\
#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"

if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi

while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac

case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 1.2.15
;;
--cflags)
echo -I"`nspire-tools path`/include/SDL"
;;
--libs|--static-libs)
echo -lSDL
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

0 comments on commit 025f272

Please sign in to comment.