2021-09-05 15:10:47 +00:00
|
|
|
VERSION=1.0
|
|
|
|
|
|
|
|
|
2021-09-03 22:09:03 +00:00
|
|
|
.PHONY: all
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf bin
|
|
|
|
|
2021-09-05 12:36:11 +00:00
|
|
|
.PHONY:test
|
|
|
|
test:
|
|
|
|
go test -v server/*.go
|
|
|
|
|
2021-09-03 22:09:03 +00:00
|
|
|
.PHONY: build
|
2021-09-05 19:44:11 +00:00
|
|
|
build: test clean
|
2021-09-03 22:09:03 +00:00
|
|
|
mkdir -p ./bin
|
2021-09-05 15:10:47 +00:00
|
|
|
# linux amd64
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/lobbyd-${VERSION}-linux-amd64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/lobbyctl-${VERSION}-linux-amd64 ctl/*.go
|
|
|
|
|
|
|
|
# linux arm
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o ./bin/lobbyd-${VERSION}-linux-arm daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o ./bin/lobbyctl-${VERSION}-linux-arm ctl/*.go
|
2021-09-03 22:09:03 +00:00
|
|
|
|
2021-09-05 15:10:47 +00:00
|
|
|
# linux arm64
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/lobbyd-${VERSION}-linux-arm64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/lobbyctl-${VERSION}-linux-arm64 ctl/*.go
|
|
|
|
|
|
|
|
# darwin amd64
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/lobbyd-${VERSION}-darwin-amd64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/lobbyctl-${VERSION}-darwin-amd64 ctl/*.go
|
|
|
|
|
|
|
|
# darwin arm64
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/lobbyd-${VERSION}-darwin-arm64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/lobbyctl-${VERSION}-darwin-arm64 ctl/*.go
|