-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmingw-build-dep.sh
executable file
·97 lines (89 loc) · 2.09 KB
/
mingw-build-dep.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
#!/bin/sh
. ./ver.sh
PREFIX=$(pwd)/dep-mingw
HOST=x86_64-w64-mingw32
if [ ! -d gmp-${VER_GMP} ]; then
tar xf gmp-${VER_GMP}.tar.lz && \
cd gmp-${VER_GMP} && \
./configure \
--disable-shared \
--enable-static \
--host=$HOST \
--disable-cxx \
--enable-fat \
--prefix=$PREFIX \
CFLAGS="-mtune=generic -O2 -g0" && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build gmp !!!; exit; fi
cd ..
fi
if [ ! -d expat-${VER_EXPAT} ]; then
tar xf expat-${VER_EXPAT}.tar.bz2 && \
cd expat-${VER_EXPAT} && \
./configure \
--disable-shared \
--enable-static \
--host=$HOST \
--prefix=$PREFIX && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build expat !!!; exit; fi
cd ..
fi
if [ ! -d sqlite-autoconf-${VER_SQLITE} ]; then
tar xf sqlite-autoconf-${VER_SQLITE}.tar.gz && \
cd sqlite-autoconf-${VER_SQLITE} && \
./configure \
--disable-shared \
--enable-static \
--host=$HOST \
--prefix=$PREFIX && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build sqlite !!!; exit; fi
cd ..
fi
if [ ! -d zlib-${VER_ZLIB} ]; then
tar xf zlib-${VER_ZLIB}.tar.gz && \
cd zlib-${VER_ZLIB} && \
CC=$HOST-gcc \
AR=$HOST-ar \
LD=$HOST-ld \
RANLIB=$HOST-ranlib \
STRIP=$HOST-strip \
./configure \
--prefix=$PREFIX \
--libdir=$PREFIX/lib \
--includedir=$PREFIX/include \
--static && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build zlib !!!; exit; fi
cd ..
fi
if [ ! -d c-ares-${VER_CARES} ]; then
tar xf c-ares-${VER_CARES}.tar.gz && \
cd c-ares-${VER_CARES} && \
./configure \
--disable-shared \
--enable-static \
--without-random \
--host=$HOST \
--prefix=$PREFIX \
LIBS="-lws2_32" && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build c-ares !!!; exit; fi
cd ..
fi
if [ ! -d libssh2-${VER_LIBSSH2} ]; then
tar xf libssh2-${VER_LIBSSH2}.tar.gz && \
cd libssh2-${VER_LIBSSH2} && \
./configure \
--disable-shared \
--enable-static \
--prefix=$PREFIX \
--host=$HOST \
--without-openssl \
--with-wincng \
LIBS="-lws2_32" && \
make install
if [ $? -ne 0 ]; then echo !!! failed to build libssh2 !!!; exit; fi
cd ..
fi