forked from Yubico/yubihsm-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (33 loc) · 852 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
40
41
42
43
44
45
46
47
48
49
50
# yubihsm-connector
MAKEFLAGS += -s
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
all: build
gen:
@go generate
build: gen
@go build -o bin/yubihsm-connector
rebuild: clean build
install: build
install bin/yubihsm-connector /usr/local/bin
cert:
@./tools/generate-certificate
run: build
@./bin/yubihsm-connector -d
srun: cert build
@./bin/yubihsm-connector -d --cert=var/cert.crt --key=var/cert.key
fmt:
@go fmt
vet: gen
@go vet
test: vet
@go test -v
docker-clean:
@docker rmi yubico/yubihsm-connector
docker-build:
@docker build -t yubico/yubihsm-connector -f Dockerfile .
docker-run:
@docker run --rm -it --privileged -v ${PWD}:/yubihsm-connector -v /dev/bus/usb/:/dev/bus/usb/ -p 12345:12345 yubico/yubihsm-connector
clean:
@rm -rf bin/* pkg/* *.syso versioninfo.json version.go
.PHONY: all build fmt vet test clean version