Skip to content

Commit

Permalink
Merge pull request #28 from bloodwiing/main
Browse files Browse the repository at this point in the history
Add Target arch support in Makefile
  • Loading branch information
fb929 authored Feb 9, 2024
2 parents 7ad77e1 + 77c2b5f commit a2f9d30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.PHONY: proto build test deps
export GOPRIVATE=github.com/anyproto
export PATH:=deps:$(PATH)
BUILD_GOARCH:=$(shell go env GOARCH)

proto:
protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. consensusproto/protos/*.proto

build:
@$(eval FLAGS := $$(shell PATH=$(PATH) govvv -flags -pkg github.com/anyproto/any-sync/app))
go build -v -o bin/any-sync-consensusnode -ldflags "$(FLAGS) -X github.com/anyproto/any-sync/app.AppName=any-sync-consensusnode" github.com/anyproto/any-sync-consensusnode/cmd
GOARCH=$(BUILD_GOARCH) go build -v -o bin/any-sync-consensusnode -ldflags "$(FLAGS) -X github.com/anyproto/any-sync/app.AppName=any-sync-consensusnode" github.com/anyproto/any-sync-consensusnode/cmd

test:
go test ./... --cover
Expand Down

0 comments on commit a2f9d30

Please sign in to comment.