forked from iegomez/mosquitto-go-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 927 Bytes
/
Makefile
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
BACKENDS='files http'
all:
CGO_LDFLAGS_ALLOW="-undefined|dynamic_lookup" go build -tags=$(BACKENDS) -buildmode=c-archive go-auth.go
CGO_LDFLAGS_ALLOW="-undefined|dynamic_lookup" go build -tags=$(BACKENDS) -buildmode=c-shared -o go-auth.so
linux:
vagrant up || vagrant reload
vagrant ssh -c "cd ~/go/src/github.com/CloudMQTT/mosquitto-go-auth; CGO_LDFLAGS_ALLOW='-undefined|dynamic_lookup' go build -tags=$(BACKENDS) -buildmode=c-archive -o go-auth-linux.a go-auth.go"
vagrant ssh -c "cd ~/go/src/github.com/CloudMQTT/mosquitto-go-auth; CGO_LDFLAGS_ALLOW='-undefined|dynamic_lookup' go build -tags=$(BACKENDS) -buildmode=c-shared -o go-auth-linux.so"
vagrant halt
requirements:
dep ensure -v
dev-requirements:
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/smartystreets/goconvey
test:
go test ./backends -v -bench=none -count=1
benchmark:
go test ./backends -v -bench=. -run=^a
clean:
go clean