2013-10-03 17:20:43 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2013-10-08 21:01:20 +00:00
|
|
|
cd `dirname $0`
|
2013-10-03 17:20:43 +00:00
|
|
|
|
|
|
|
export GOPATH=`pwd`
|
|
|
|
|
|
|
|
if [ -d $HOME/go ]; then
|
|
|
|
export GOROOT=$HOME/go
|
|
|
|
fi
|
2013-10-08 21:01:20 +00:00
|
|
|
|
|
|
|
pushd src
|
2013-10-23 16:42:28 +00:00
|
|
|
export packages="admin api/http common configuration coordinator datastore engine interfaces main parser protocol server"
|
2013-10-08 21:01:20 +00:00
|
|
|
popd
|
|
|
|
|
2013-10-11 14:55:35 +00:00
|
|
|
snappy_dir=/tmp/snappychronosdb
|
|
|
|
leveldb_dir=/tmp/leveldbchronosdb
|
|
|
|
export LD_LIBRARY_PATH=/usr/local/lib
|
|
|
|
if [ `uname` == "Linux" ]; then
|
|
|
|
export CGO_CFLAGS="-I$leveldb_dir/include"
|
|
|
|
export CGO_LDFLAGS="$leveldb_dir/libleveldb.a $snappy_dir/.libs/libsnappy.a -lstdc++"
|
|
|
|
else
|
|
|
|
export CGO_LDFLAGS="-lleveldb -lsnappy -lstdc++"
|
|
|
|
fi
|