From 8f6e13bd08d2f37027d34c0f379a79a6c5263e8a Mon Sep 17 00:00:00 2001 From: Carlos Martín Nieto Date: Sat, 27 Dec 2014 10:59:19 +0000 Subject: Make the cgo tool do more linking work 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 --- git.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git.go') diff --git a/git.go b/git.go index 89bd561..6a5562a 100644 --- a/git.go +++ b/git.go @@ -1,6 +1,8 @@ package git /* +#cgo pkg-config: --static --define-variable=libdir=vendor/libgit2/build --define-variable=includedir=vendor/libgit2/include vendor/libgit2/build/libgit2.pc +#cgo LDFLAGS: -lgit2 #include */ import "C" -- cgit v1.2.3