libgoatvr

view configure @ 4:9ed0f1efd4cd

added post-build rules and install.bat
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 29 Aug 2014 07:37:19 +0300
parents
children 6896f9cf9621
line source
1 #!/bin/sh
3 prefix=/usr/local
4 opt=false
5 dbg=true
6 use_libovr=true
7 use_openhmd=false # not done
9 while [ $# != 0 ]; do
10 case $1 in
11 --prefix=*)
12 value=`echo $arg | sed 's/--prefix=//'`
13 prefix=${value:-$prefix}
14 ;;
16 --enable-libovr)
17 use_libovr=true
18 ;;
19 --disable-libovr)
20 use_libovr=false
21 ;;
23 --enable-openhmd)
24 use_openhmd=true
25 ;;
26 --disable-openhmd)
27 use_openhmd=false
28 ;;
30 --enable-opt)
31 opt=true
32 ;;
33 --disable-opt)
34 opt=false
35 ;;
36 --enable-debug)
37 dbg=true
38 ;;
39 --disable-debug)
40 dbg=false
41 ;;
43 --help)
44 echo 'options:'
45 echo '--prefix=<path>: installation path (default: /usr/local)'
46 echo '--enable-libovr: enable the Oculus SDK VR module (default)'
47 echo '--disable-libovr: disable the Oculus SDK VR module'
48 echo '--enable-openhmd: enable the OpenHMD VR module (default)'
49 echo '--disable-openhmd: disable the OpenHMD VR module'
50 echo '--enable-opt: enable optimizations'
51 echo '--disable-opt: disable optimizations'
52 echo '--enable-debug: enable debugging symbols (default)'
53 echo '--disable-debug: disable debugging symbols'
54 exit 0
55 ;;
56 esac
57 shift
58 done
60 echo 'Configuring libgoatvr...'
61 echo " install prefix: $prefix"
62 echo ' optimizations: ' `$opt && echo yes || echo no`
63 echo ' debug symbols: ' `$opt && echo yes || echo no`
64 echo ' use Oculus SDK (LibOVR): ' `$use_libovr && echo yes || echo no`
65 echo ' use OpenHMD: ' `$use_openhmd && echo yes || echo no`
67 echo '# generated makefile, do not edit' >Makefile
68 echo "PREFIX = $prefix" >>Makefile
69 if $opt; then
70 echo 'opt = -O3' >>Makefile
71 fi
72 if $dbg; then
73 echo 'dbg = -g' >>Makefile
74 fi
75 if $use_libovr; then
76 echo 'use_libovr = 1' >>Makefile
77 fi
78 if $use_openhmd; then
79 echo 'use_openhmd = 1' >>Makefile
80 fi
81 echo '# ----------------' >>Makefile
83 cat Makefile.in >>Makefile