mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 17:31:34 +00:00
Makefile changes for cross-building and standardized builds using gox
This commit is contained in:
@ -9,32 +9,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
||||
# Change into that dir because we expect that.
|
||||
cd "$DIR"
|
||||
|
||||
# Get the git commit
|
||||
GIT_COMMIT="$(git rev-parse --short HEAD)"
|
||||
GIT_IMPORT="github.com/tendermint/tendermint/version"
|
||||
|
||||
# Determine the arch/os combos we're building for
|
||||
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
|
||||
XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"}
|
||||
|
||||
# Make sure build tools are available.
|
||||
make tools
|
||||
|
||||
# Get VENDORED dependencies
|
||||
make get_vendor_deps
|
||||
|
||||
# Build!
|
||||
# ldflags: -s Omit the symbol table and debug information.
|
||||
# -w Omit the DWARF symbol table.
|
||||
echo "==> Building..."
|
||||
"$(which gox)" \
|
||||
-os="${XC_OS}" \
|
||||
-arch="${XC_ARCH}" \
|
||||
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
|
||||
-ldflags "-s -w -X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}" \
|
||||
-output "build/pkg/{{.OS}}_{{.Arch}}/tendermint" \
|
||||
-tags="${BUILD_TAGS}" \
|
||||
github.com/tendermint/tendermint/cmd/tendermint
|
||||
# Make sure build tools are available, get VENDORED dependencies and build
|
||||
make get_tools get_vendor_deps build_cc
|
||||
|
||||
# Zip all the files.
|
||||
echo "==> Packaging..."
|
||||
|
Reference in New Issue
Block a user