Skip to content

Instantly share code, notes, and snippets.

@calavera
Created February 20, 2015 11:10
Show Gist options
  • Save calavera/045b5bfafefe643649ff to your computer and use it in GitHub Desktop.
Save calavera/045b5bfafefe643649ff to your computer and use it in GitHub Desktop.
LIBGIT2=${LIBGIT2:-$(pwd)/vendor/libgit2}
export BUILD="$LIBGIT2/build"
export PCFILE="$BUILD/libgit2.pc"
FLAGS=$(pkg-config --static --libs $PCFILE) || exit 1
export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD ${FLAGS}"
export CGO_CFLAGS="-I$LIBGIT2/include"
godep go build -x --ldflags '-extldflags "-static"' -o $dest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment