diff options
Diffstat (limited to 'src/generate-gl-glue.sh')
-rwxr-xr-x | src/generate-gl-glue.sh | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/generate-gl-glue.sh b/src/generate-gl-glue.sh index b5ba951..f6abf2a 100755 --- a/src/generate-gl-glue.sh +++ b/src/generate-gl-glue.sh @@ -4,7 +4,13 @@ base="/Users/pixel/sources/Mesa-7.2/include/GL" files="gl.h glu.h" -os=`uname` +if [ "$1" != "" ] ; then + os=$1 +fi + +if [ "$os" == "" ] ; then + os=`uname` +fi for f in $files ; do cat $base/$f ; done | grep ^GLAPI.*ENTRY | @@ -33,15 +39,29 @@ done echo ".subsections_via_symbols" -else +elif [ "$os" == "Linux" ] ; then cat tmp-symbol-list.txt | while read symbol ; do echo ".globl m$symbol" echo ".type m$symbol, @function" + echo "m$symbol:" echo "jmp $symbol" echo ".size m$symbol, .-m$symbol" done +elif [ "$os" == "mingw32" ] ; then + +cat tmp-symbol-list.txt | while read symbol do + echo ".globl _m$symbol" + echo ".def _m$symbol; .scl 2; .type 32; .endef;" + echo "_m$symbol:" + echo "jmp _$symbol" +done + +cat tmp-symbol-list.txt | while read symbol do + echo ".def _$symbol; .scl 2; .type 32; .endef;" +done + fi rm tmp-symbol-list.txt |