From 3db9f2f0ab44e104c47ebcee518925b3bf7eec94 Mon Sep 17 00:00:00 2001 From: kerem Date: Thu, 9 Dec 2021 18:59:48 +0300 Subject: [PATCH] add makefile build commands for darwin OS (#640) Co-authored-by: Bo-Yi Wu --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index abed818..c83f927 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,21 @@ build_linux_arm: build_linux_lambda: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags 'lambda' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/lambda/$(DEPLOY_IMAGE) +build_darwin_amd64: + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/darwin/amd64/$(DEPLOY_IMAGE) + +build_darwin_i386: + CGO_ENABLED=0 GOOS=darwin GOARCH=386 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/darwin/i386/$(DEPLOY_IMAGE) + +build_darwin_arm64: + CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/darwin/arm64/$(DEPLOY_IMAGE) + +build_darwin_arm: + CGO_ENABLED=0 GOOS=darwin GOARCH=arm GOARM=7 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/darwin/arm/$(DEPLOY_IMAGE) + +build_darwin_lambda: + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -tags 'lambda' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/darwin/lambda/$(DEPLOY_IMAGE) + clean: $(GO) clean -modcache -x -i ./... find . -name coverage.txt -delete