aboutsummaryrefslogtreecommitdiff
path: root/bindings/go/Makefile
blob: c38f2340eee8cce0b9eab105d2c7d76f4b6e38a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 src/github.com/kless/goconfig/config ]; then \
	    $(GO) get github.com/kless/goconfig/config; \
	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