forked from xu4-engine/u4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·46 lines (42 loc) · 1.18 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Configuration Options:"
echo " -h, --help Display this help and exit"
echo " --allegro Use Allegro 5.2 as the platform API (default)"
echo " --sdl Use SDL 1.2 as the platform API"
echo " --boron Use Boron/CDI configuration (default)"
echo " --xml Use XML configuration"
echo " --gpu Use GPU rendering"
echo " --prefix <dir> Set install directory root"
exit
fi
PLATFORM=allegro
CONF=boron
PREFIX=/usr/local
GPU=false
while [ "$1" != "" ]; do
case $1 in
--allegro )
PLATFORM=allegro ;;
--sdl)
PLATFORM=sdl ;;
--boron )
CONF=boron ;;
--xml)
CONF=xml ;;
--gpu)
GPU=true ;;
--prefix)
shift
PREFIX=$1 ;;
*)
echo "Invalid option $opt"
exit 1
;;
esac
shift
done
echo "Generating make.config & project.config"
printf "os_api: \'${PLATFORM}\nuse_boron: $([[ ${CONF} = boron ]] && echo true || echo false)\ngpu_render: ${GPU}\n" >project.config
printf "PREFIX=${PREFIX}\nUI=${PLATFORM}\nCONF=${CONF}\nGPU=${GPU}" >make.config
echo "Now type make (or copr) to build."