-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
23 lines (18 loc) · 860 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
BINARY=tpm2-attest
LDFLAGS=-ldflags "-s -w"
BUILDFLAGS=-trimpath
build:
go build -o bin/${BINARY} .
release:
CGO_ENABLED=0 GOOS=linux go build ${BUILDFLAGS} ${LDFLAGS} -o bin/${BINARY}_${VERSION}_linux_amd64.bin .
release-all:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ${BUILDFLAGS} ${LDFLAGS} -o bin/${BINARY}_${VERSION}_linux_amd64.bin
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build ${BUILDFLAGS} ${LDFLAGS} -o bin/${BINARY}_${VERSION}_linux_arm64.bin
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build ${BUILDFLAGS} ${LDFLAGS} -o bin/${BINARY}_${VERSION}_linux_arm.bin
android:
if [ ! -d "bin/" ]; then mkdir ./bin/ ; fi
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile bind -o bin/attest.aar -target=android -androidapi 27 ./mobile/
clean:
if [ -d "bin/" ]; then find bin/ -type f -delete ;fi
if [ -d "bin/" ]; then rm -d bin/ ;fi