X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=contrib%2Fgo%2FMakefile;fp=contrib%2Fgo%2FMakefile;h=1b9e7505872129452e395fc2ab7f0a58aa4e784c;hp=0000000000000000000000000000000000000000;hb=b0d03fc5ba1211ed783a5c052d01407d95c8446f;hpb=2f2df00d436b117acd3e0de13548406efaf272b8 diff --git a/contrib/go/Makefile b/contrib/go/Makefile new file mode 100644 index 00000000..1b9e7505 --- /dev/null +++ b/contrib/go/Makefile @@ -0,0 +1,40 @@ +# Makefile for the go bindings of notmuch + +export GOPATH ?= $(shell pwd) +export CGO_CFLAGS ?= -I../../../../lib +export CGO_LDFLAGS ?= -L../../../../lib + +GO ?= go +GOFMT ?= gofmt + +all: notmuch notmuch-addrlookup + +.PHONY: notmuch +notmuch: + $(GO) install notmuch + +.PHONY: goconfig +goconfig: + if [ ! -d github.com/msbranco/goconfig ]; then \ + $(GO) get github.com/msbranco/goconfig; \ + fi + +.PHONY: notmuch-addrlookup +notmuch-addrlookup: notmuch goconfig + $(GO) install notmuch-addrlookup + +.PHONY: format +format: + $(GOFMT) -w=true $(GOFMT_OPTS) src/notmuch + $(GOFMT) -w=true $(GOFMT_OPTS) src/notmuch-addrlookup + +.PHONY: check-format +check-format: + $(GOFMT) -d=true $(GOFMT_OPTS) src/notmuch + $(GOFMT) -d=true $(GOFMT_OPTS) src/notmuch-addrlookup + +.PHONY: clean +clean: + $(GO) clean notmuch + $(GO) clean notmuch-addrlookup + rm -rf pkg bin