2021-09-18 17:34:18 +00:00
|
|
|
VERSION=1.2
|
2021-09-05 15:10:47 +00:00
|
|
|
|
|
|
|
|
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-06 23:18:17 +00:00
|
|
|
init:
|
2021-09-03 22:09:03 +00:00
|
|
|
mkdir -p ./bin
|
2021-09-06 23:18:17 +00:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: test clean init linux-amd64 linux-arm linux-arm64 darwin-amd64 darwin-arm64
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: linux-amd64
|
|
|
|
linux-amd64: clean init
|
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
|
|
|
|
|
2021-09-06 23:18:17 +00:00
|
|
|
.PHONY: linux-arm
|
|
|
|
linux-arm: clean init
|
2021-09-05 15:10:47 +00:00
|
|
|
# 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-06 23:18:17 +00:00
|
|
|
.PHONY: linux-arm64
|
|
|
|
linux-arm64: clean init
|
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
|
|
|
|
|
2021-09-06 23:18:17 +00:00
|
|
|
.PHONY: darwin-amd64
|
|
|
|
darwin-amd64: clean init
|
2021-09-05 15:10:47 +00:00
|
|
|
# darwin amd64
|
2021-09-06 23:18:17 +00:00
|
|
|
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ./bin/lobbyd-${VERSION}-darwin-amd64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ./bin/lobbyctl-${VERSION}-darwin-amd64 ctl/*.go
|
2021-09-05 15:10:47 +00:00
|
|
|
|
2021-09-06 23:18:17 +00:00
|
|
|
.PHONY: darwin-arm64
|
|
|
|
darwin-arm64: clean init
|
2021-09-05 15:10:47 +00:00
|
|
|
# darwin arm64
|
2021-09-06 23:18:17 +00:00
|
|
|
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./bin/lobbyd-${VERSION}-darwin-arm64 daemon/*.go
|
|
|
|
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./bin/lobbyctl-${VERSION}-darwin-arm64 ctl/*.go
|