forked from myaniu/qcn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·103 lines (97 loc) · 3.18 KB
/
build
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
#!/bin/sh
#if (test "$1" = "all" || test "$2" = "all") then
# ./getboinc
#fi
if ( test "`uname -s`" = "Darwin" ) then
rm -f vers; gcc version.c -o vers
VERSION=`./vers 1`
fi
rm -f vers; gcc version.c -o vers
VERSION=`./vers`
./set-version $VERSION
if ( test "$VERSION" = "" ) then
exit 1
fi
if ( test "`uname -s`" = "Darwin" ) then
cp qcn_config_mac.h config.h
./build.mac $1 $2
else
if ( test "`uname -m`" = "armv6l" ) then
cp client/main/Makefile.am.ARM client/main/Makefile.am
OSBUILD='armv6_build'
ARMFLAGS='__LINUX_ARMV6__'
else
if ( test "`uname -m`" = "armv5tel" ) then
cp client/main/Makefile.am.ARM client/main/Makefile.am
OSBUILD='armv5_build'
ARMFLAGS='__LINUX_ARMV5__'
else
OSBUILD='linux_build'
cp client/main/Makefile.am.LINUX client/main/Makefile.am
cp client/qcnlive/Makefile.linux client/qcnlive/Makefile
fi
fi
if (test "$1" = "all" || test "$2" = "all" || test "$1" = "libs" || test "$2" = "libs") then
cd zlib-1.2.5
./configure --static
make clean && make
cp libz.a ../client/$OSBUILD/
cd ../bzip2-1.0.6
make clean && make
cp libbz2.a ../client/$OSBUILD/
# make sure there's a /usr/local/bin/libtool for jpeg-6b
#cd ../jpeg-6b
#./configure --enable-static
#make clean && make
#cp .libs/libjpeg.a ../client/$OSBUILD/
cd ../curl
./configure --disable-crypto-auth --without-ssl --disable-ldap --disable-ldaps --disable-telnet --enable-static --disable-shared
make clean && make
cp lib/.libs/libcurl.a ../client/$OSBUILD/
cd ../freetype-2.4.6
./configure --enable-shared=no --enable-static=yes
make clean && make
cp objs/.libs/libfreetype.a ../client/$OSBUILD/
export CFLAGS=-I$PWD/../freetype-2.4.6/include
export CPPFLAGS=-I$PWD/../freetype-2.4.6/include
export CXXFLAGS=-I$PWD/../freetype-2.4.6/include
cd ../ftgl-2.1.3
./configure --enable-shared=no --enable-static=yes
make clean && make
cp src/.libs/libftgl.a ../client/$OSBUILD/
export CFLAGS=
export CPPFLAGS=
export CXXFLAGS=
# Note - probably need to edit boinc/configure.ac & Makefile.am to add zip/Makefile and zip as a subdir
# check qcn/boinc_configure.ac and qcn/boinc_Makefile.am, but basically:
# i.e. in Makefile.am should read:
# if ENABLE_LIBRARIES
# API_SUBDIRS = api lib zip zip/zip zip/unzip
# endif
# in configure.ac should read:
# zip/Makefile
# zip/zip/Makefile
# zip/unzip/Makefile
cd ../../boinc
cp Makefile.am Makefile.am.bak
cp ../qcn/boinc_Makefile.am Makefile.am
cp ../qcn/boinc_configure.ac configure.ac
# always build the latest boinc libs
./_autosetup
./configure --disable-client --disable-server --enable-libraries
make clean && make
cp samples/jpeglib/libjpeg.a ../qcn/client/$OSBUILD/
cp zip/libboinc_zip.a ../qcn/client/$OSBUILD/
cp lib/libboinc.a ../qcn/client/$OSBUILD/
cp api/libboinc_api.a ../qcn/client/$OSBUILD/
cp api/libboinc_graphics2.a ../qcn/client/$OSBUILD/
cd ../qcn
fi # end of library or 'all' build
./set-version $VERSION
./_autosetup
./configure --disable-client --disable-server
make clean ; make
mv client/qcnlive/QCNLive client/bin/
fi
cd client/bin
./deploy $VERSION $1 $2