forked from iegomez/mosquitto-go-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 789 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
28
29
30
31
32
33
34
35
36
37
38
39
CFLAGS := -I/usr/local/include -fPIC
LDFLAGS := -shared
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LDFLAGS += -undefined dynamic_lookup
endif
all:
@echo "Bulding for $(UNAME_S)"
env CGO_CFLAGS="$(CFLAGS)" go build -buildmode=c-archive go-auth.go
env CGO_LDFLAGS="$(LDFLAGS)" go build -buildmode=c-shared -o go-auth.so
go build pw-gen/pw.go
test:
cd plugin && make
go test ./backends ./cache ./hashing -v -count=1
rm plugin/*.so
test-backends:
cd plugin && make
go test ./backends -v -failfast -count=1
rm plugin/*.so
test-cache:
go test ./cache -v -failfast -count=1
test-hashing:
go test ./hashing -v -failfast -count=1
service:
@echo "Generating gRPC code from .proto files"
@go generate grpc/grpc.go
clean:
rm -f go-auth.h
rm -f go-auth.so
rm -f pw