Mercurial > hg > quicktun
comparison build.sh @ 14:d9dfeeaff7e8 V2.1.4
Added BSD support to build script, updated NaCl URL to new version, added version file
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sat, 08 Jan 2011 03:52:25 +0100 |
parents | f7e0145d8e2a |
children | 8f564c559416 d621348448de |
comparison
equal
deleted
inserted
replaced
13:f7e0145d8e2a | 14:d9dfeeaff7e8 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 tar=tar | 3 if [ `uname -s` == "OpenBSD" -o `uname -s` == "FreeBSD" ]; then |
4 | 4 echo "Detected *BSD" |
5 if [ `uname -s` == "SunOS" ]; then | 5 tar="gtar" |
6 elif [ `uname -s` == "SunOS" ]; then | |
6 echo "Detected SunOS" | 7 echo "Detected SunOS" |
7 tar=gtar | 8 tar="gtar" |
8 CFLAGS="$CFLAGS -DSOLARIS -m64" | 9 CFLAGS="$CFLAGS -DSOLARIS -m64" |
9 LDFLAGS="$LDFLAGS -lnsl -lsocket" | 10 LDFLAGS="$LDFLAGS -lnsl -lsocket" |
11 else | |
12 tar="tar" | |
10 fi | 13 fi |
11 | 14 |
12 echo Cleaning up... | 15 echo Cleaning up... |
13 rm -rf out/ obj/ tmp/ | 16 rm -rf out/ obj/ tmp/ |
14 | 17 |
21 echo Checking for NaCl library... | 24 echo Checking for NaCl library... |
22 if [ ! -e lib/libnacl.a ]; then | 25 if [ ! -e lib/libnacl.a ]; then |
23 echo building... | 26 echo building... |
24 mkdir tmp/nacl | 27 mkdir tmp/nacl |
25 cd tmp/nacl | 28 cd tmp/nacl |
26 wget -q -O- http://hyperelliptic.org/nacl/nacl-20090405.tar.bz2 | bunzip2 | tar -xf - --strip-components 1 | 29 wget -q -O- http://hyperelliptic.org/nacl/nacl-20090405.tar.bz2 | bunzip2 | $tar -xf - --strip-components 1 |
27 ./do | 30 ./do |
28 cd ../../ | 31 cd ../../ |
29 cp tmp/nacl/build/*/lib/*/libnacl.a lib/ | 32 cp tmp/nacl/build/*/lib/*/libnacl.a lib/ |
30 cp tmp/nacl/build/*/include/*/crypto_box.h include/ | 33 cp tmp/nacl/build/*/include/*/crypto_box.h include/ |
31 cp tmp/nacl/build/*/include/*/crypto_box_curve25519salsa20hmacsha512.h include/ | 34 cp tmp/nacl/build/*/include/*/crypto_box_curve25519salsa20hmacsha512.h include/ |