@@ -6,6 +6,8 @@ AWSKMS_BINNAME?=step-awskms-init
6
6
AWSKMS_PKG? =github.com/smallstep/certificates/cmd/step-awskms-init
7
7
YUBIKEY_BINNAME? =step-yubikey-init
8
8
YUBIKEY_PKG? =github.com/smallstep/certificates/cmd/step-yubikey-init
9
+ PKCS11_BINNAME? =step-pkcs11-init
10
+ PKCS11_PKG? =github.com/smallstep/certificates/cmd/step-pkcs11-init
9
11
10
12
# Set V to 1 for verbose output from the Makefile
11
13
Q =$(if $V,,@)
@@ -76,7 +78,7 @@ GOFLAGS := CGO_ENABLED=0
76
78
download :
77
79
$Q go mod download
78
80
79
- build : $(PREFIX ) bin/$(BINNAME ) $(PREFIX ) bin/$(CLOUDKMS_BINNAME ) $(PREFIX ) bin/$(AWSKMS_BINNAME ) $(PREFIX ) bin/$(YUBIKEY_BINNAME )
81
+ build : $(PREFIX ) bin/$(BINNAME ) $(PREFIX ) bin/$(CLOUDKMS_BINNAME ) $(PREFIX ) bin/$(AWSKMS_BINNAME ) $(PREFIX ) bin/$(YUBIKEY_BINNAME ) $( PREFIX ) bin/ $( PKCS11_BINNAME )
80
82
@echo " Build Complete!"
81
83
82
84
$(PREFIX ) bin/$(BINNAME ) : download $(call rwildcard,* .go)
@@ -95,6 +97,10 @@ $(PREFIX)bin/$(YUBIKEY_BINNAME): download $(call rwildcard,*.go)
95
97
$Q mkdir -p $(@D )
96
98
$Q $(GOOS_OVERRIDE ) $(GOFLAGS ) go build -v -o $(PREFIX ) bin/$(YUBIKEY_BINNAME ) $(LDFLAGS ) $(YUBIKEY_PKG )
97
99
100
+ $(PREFIX ) bin/$(PKCS11_BINNAME ) : download $(call rwildcard,* .go)
101
+ $Q mkdir -p $(@D )
102
+ $Q $(GOOS_OVERRIDE ) $(GOFLAGS ) go build -v -o $(PREFIX ) bin/$(PKCS11_BINNAME ) $(LDFLAGS ) $(PKCS11_PKG )
103
+
98
104
# Target to force a build of step-ca without running tests
99
105
simple : build
100
106
@@ -113,7 +119,7 @@ generate:
113
119
# Test
114
120
# ########################################
115
121
test :
116
- $Q $( GOFLAGS ) go test -short -coverprofile=coverage.out ./...
122
+ $Q go test -short -coverprofile=coverage.out ./...
117
123
118
124
.PHONY : test
119
125
@@ -171,6 +177,9 @@ endif
171
177
ifneq ($(YUBIKEY_BINNAME ) ,"")
172
178
$Q rm -f bin/$(YUBIKEY_BINNAME)
173
179
endif
180
+ ifneq ($(PKCS11_BINNAME ) ,"")
181
+ $Q rm -f bin/$(PKCS11_BINNAME)
182
+ endif
174
183
175
184
.PHONY : clean
176
185
0 commit comments