forked from edrosten/threeB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_and_install.sh
151 lines (124 loc) · 2.72 KB
/
build_and_install.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
. /tmp/setup_build_env.sh
if [ x$variant == xmingw32 ] || [ x$variant == xmingw64 ]
then
echo AA1 Building jpeglib
cd /tmp/jpeg-9a
check
./configure $host $pref && make $J && make install
check
echo AA2 Building zlib
cd /tmp/zlib-1.2.8
check
#Zlib is speshul. Too "cool" to use the "crap" autoconf or something, so naturally
#it's a pain to compile.
RANLIB="$RANLIB" AR="$AR" CC="$CC" ./configure --static $pref && make libz.a $J && make install
check
echo AA3 Building png
cd /tmp/libpng-1.6.18
check
LDFLAGS="-L$prefdir/lib -lz " ./configure $host $pref
make $J
check
make install
check
echo AA4 Building libtiff
cd /tmp/tiff-3.9.7
check
LDFLAGS="-L$prefdir/lib -lz " ./configure $host $pref
check
make $J
check
make install
check
fi
cd /tmp/CLAPACK-3.2.1
cp make.inc.example make.inc
patch make.inc <<FOO
24c24
< CC = gcc
---
> CC = $CC $LAPACK_CCFLAGS
27c27
< CFLAGS = -O3 -I\$(TOPDIR)/INCLUDE
---
> CFLAGS = -O3 -I\$(TOPDIR)/INCLUDE $PIC
30c30
< NOOPT = -O0 -I\$(TOPDIR)/INCLUDE
---
> NOOPT = -O0 -I\$(TOPDIR)/INCLUDE $PIC
53c53
< ARCH = ar
---
> ARCH = $AR
55c55
< RANLIB = ranlib
---
> RANLIB = $RANLIB
FOO
check
##No need to remove main from libf2c because since we are linking a library
##apparently doesn't pull in main(). Hmm
#patch F2CLIBS/libf2c/Makefile < ../clapack.patch
#check
#Remove nasty things which clock cross compiling
patch -p1 < ../clapack_mingw.patch
make $J blaslib
check
make $J f2clib
check
cd INSTALL
make ilaver.o slamch.o dlamch.o lsame.o
check
echo > second.c
cd ..
make $J lapacklib
echo AAg results: $?
check
set -o xtrace
echo AAh Copying libraries
if [ x$variant == xmingw32 ] || [ x$variant == xmingw64 ]
then
mkdir -p $prefdir/lib
cp blas_LINUX.a $prefdir/lib/libblas.a
check
cp lapack_LINUX.a $prefdir/lib/liblapack.a
check
cp F2CLIBS/libf2c.a $prefdir/lib/libf2c.a
else
mkdir -p /usr/local/lib
cp blas_LINUX.a /usr/local/lib/libblas.a
check
cp lapack_LINUX.a /usr/local/lib/liblapack.a
check
cp F2CLIBS/libf2c.a /usr/local/lib/libf2c.a
check
fi
echo AAa Building and installing TooN2
cd /tmp/$TOON
check
./configure $host $pref && make $J && make install
check
echo AAb Building and installing GVars3
cd /tmp/$GVARS
check
./configure $host $pref --without-head --without-lang && make $J && make install
check
echo AAc Building and installing libcvd
cd /tmp/$CVD
check
LIBS="$CVD_LIBS" ./configure $host $pref --disable-fast7 --disable-fast8 --disable-fast9 --disable-fast10 --disable-fast11 --disable-fast12 && make $J && make install
check
/sbin/ldconfig
echo AAd Perhaps doung some MinGW hacks
cd /tmp/mingw32/lib
for i in *.a
do
$RANLIB $i
done
cd /tmp/mingw64/lib
for i in *.a
do
$RANLIB $i
done
pwd
exit 0