Merge branch 'build-env' of https://github.com/status-im/status-go into account-bindings

This commit is contained in:
Daniel Whitenack 2016-06-19 20:46:34 -05:00
commit 994b3e45b0
537 changed files with 73 additions and 5 deletions

35
.gitignore vendored Normal file
View File

@ -0,0 +1,35 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
/tmp
*/**/*un~
*/**/*.test
*un~
.DS_Store
*/**/.DS_Store
.ethtest
*/**/*tx_database*
*/**/*dapps*
Godeps/_workspace/pkg
Godeps/_workspace/bin
#*
.#*
*#
*~
.project
.settings
# used by the Makefile
/build/_workspace/
/build/bin/
# travis
profile.tmp
profile.cov
# vagrant
.vagrant

View File

@ -1,13 +1,14 @@
GOBIN = build/bin
GO ?= latest GO ?= latest
statusgo: statusgo:
go install build/env.sh go build -i -o $(GOBIN)/statusgo ./src
@echo "Done installing status go." @echo "status go compilation done."
@echo "Run \"statusgo\" to view available commands" @echo "Run \"build/bin/statusgo\" to view available commands"
statusgo-android: xgo statusgo-android: xgo
xgo --go=$(GO) --targets=android-16/aar ./ build/env.sh $(GOBIN)/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar ./src
@echo "Android cross compilation done:" @echo "Android cross compilation done:"
xgo: xgo:
go get github.com/karalabe/xgo build/env.sh go get github.com/karalabe/xgo

32
build/env.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
set -e
if [ ! -f "build/env.sh" ]; then
echo "$0 must be run from the root of the repository."
exit 2
fi
# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/ethereum"
if [ ! -L "$ethdir/go-ethereum" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. go-ethereum
cd "$root"
fi
# Set up the environment to use the workspace.
# Also add Godeps workspace so we build using canned dependencies.
GOPATH="$ethdir/go-ethereum/Godeps/_workspace:$workspace"
GOBIN="$PWD/build/bin"
export GOPATH GOBIN
# Run the command inside the workspace.
cd "$ethdir/go-ethereum"
PWD="$ethdir/go-ethereum"
# Launch the arguments with the configured environment.
exec "$@"

Some files were not shown because too many files have changed in this diff Show More