This lets us specify which set of rules to link to libgit2 we'll use during
build. Together with the changes to the Makefile, this lets you specify
make install
or
make install-static
to build either dynamically against the system-provided library or against the
version specified in the submodule.
The dynamic linking against the system library is still the default in order to
allow for the Go toolchain to build it when it's used as a dependency.
CGO can perform variable substitution in the directives, so we don't
need to use a script to set up the variables; we can let the go tool do
it for us.
The cgo directives let us do a lot more than I previously thought, so we
can use this to make the building process of git2go go through the go
tool directly rather than via the script.
libgit2 still needs to be built manually, so we do still require make,
but only for building libgit2. Once that's built, any modifications to
git2go's own code can be built with
go build