nuclear@1: #!/bin/sh nuclear@1: nuclear@1: prefix=/usr/local nuclear@1: opt=false nuclear@1: dbg=true nuclear@1: use_libovr=true nuclear@1: use_openhmd=false # not done nuclear@1: nuclear@1: while [ $# != 0 ]; do nuclear@1: case $1 in nuclear@1: --prefix=*) nuclear@1: value=`echo $arg | sed 's/--prefix=//'` nuclear@1: prefix=${value:-$prefix} nuclear@1: ;; nuclear@1: nuclear@1: --enable-libovr) nuclear@1: use_libovr=true nuclear@1: ;; nuclear@1: --disable-libovr) nuclear@1: use_libovr=false nuclear@1: ;; nuclear@1: nuclear@1: --enable-openhmd) nuclear@1: use_openhmd=true nuclear@1: ;; nuclear@1: --disable-openhmd) nuclear@1: use_openhmd=false nuclear@1: ;; nuclear@1: nuclear@1: --enable-opt) nuclear@1: opt=true nuclear@1: ;; nuclear@1: --disable-opt) nuclear@1: opt=false nuclear@1: ;; nuclear@1: --enable-debug) nuclear@1: dbg=true nuclear@1: ;; nuclear@1: --disable-debug) nuclear@1: dbg=false nuclear@1: ;; nuclear@1: nuclear@1: --help) nuclear@1: echo 'options:' nuclear@1: echo '--prefix=: installation path (default: /usr/local)' nuclear@1: echo '--enable-libovr: enable the Oculus SDK VR module (default)' nuclear@1: echo '--disable-libovr: disable the Oculus SDK VR module' nuclear@1: echo '--enable-openhmd: enable the OpenHMD VR module (default)' nuclear@1: echo '--disable-openhmd: disable the OpenHMD VR module' nuclear@1: echo '--enable-opt: enable optimizations' nuclear@1: echo '--disable-opt: disable optimizations' nuclear@1: echo '--enable-debug: enable debugging symbols (default)' nuclear@1: echo '--disable-debug: disable debugging symbols' nuclear@1: exit 0 nuclear@1: ;; nuclear@1: esac nuclear@1: shift nuclear@1: done nuclear@1: nuclear@1: echo 'Configuring libgoatvr...' nuclear@1: echo " install prefix: $prefix" nuclear@1: echo ' optimizations: ' `$opt && echo yes || echo no` nuclear@1: echo ' debug symbols: ' `$opt && echo yes || echo no` nuclear@1: echo ' use Oculus SDK (LibOVR): ' `$use_libovr && echo yes || echo no` nuclear@1: echo ' use OpenHMD: ' `$use_openhmd && echo yes || echo no` nuclear@1: nuclear@1: echo '# generated makefile, do not edit' >Makefile nuclear@1: echo "PREFIX = $prefix" >>Makefile nuclear@1: if $opt; then nuclear@1: echo 'opt = -O3' >>Makefile nuclear@1: fi nuclear@1: if $dbg; then nuclear@1: echo 'dbg = -g' >>Makefile nuclear@1: fi nuclear@1: if $use_libovr; then nuclear@1: echo 'use_libovr = 1' >>Makefile nuclear@1: fi nuclear@1: if $use_openhmd; then nuclear@1: echo 'use_openhmd = 1' >>Makefile nuclear@1: fi nuclear@1: echo '# ----------------' >>Makefile nuclear@1: nuclear@1: cat Makefile.in >>Makefile