-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·52 lines (46 loc) · 1.04 KB
/
setup.sh
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
47
48
49
50
51
#!/bin/sh
if test -z $1; then
echo no computer specified
exit;
fi
autogen_CMDLINE="$autogen_CMDLINE --prefix=$HOME"
CFLAGS="-I$HOME/include -march=native "
simd_ISA="sse2"
error=""
for param in $@; do
case $param in
windows)
autogen_CMDLINE="$autogen_CMDLINE --build=i686-pc-mingw32 "
#we add -lgdi32 -lcomdlg32 which are added when gcc is run with the
# -mwindows parameter. We don't use -mwindows flag because we want to build
# a console application
export LDFLAGS="-L`pwd`/lib/i686-pc-mingw32 -lgdi32 -lcomdlg32"
;;
workpc)
export PKG_CONFIG_PATH="$HOME/lib/pkgconfig"
;;
compute)
export LDFLAGS="-L$HOME/lib/"
;;
genesis)
export LDFLAGS="-L$HOME/lib/"
;;
*)
;;
esac
done
if test -n "$error"; then
echo ERROR: $error
exit;
fi
case $simd_ISA in
sse)
./autogen.sh $autogen_CMDLINE --enable-simd=sse
;;
sse2)
./autogen.sh $autogen_CMDLINE --enable-simd=sse2
;;
*)
./autogen.sh $autogen_CMDLINE
;;
esac;