-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 780 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
VERSION=$(shell git describe --tags)
LDFLAGS=-ldflags "-s -w"
all: linux darwin windows
release: all zip
clean:
rm -rf bin/* *.zip
upx:
upx -9 bin/*
linux:
CGO_ENABLE=0 GOOS=linux GOARCH=amd64 go build -o bin/server-linux-amd64 ${LDFLAGS} cmd/server/main.go
CGO_ENABLE=0 GOOS=linux GOARCH=386 go build -o bin/server-linux-i386 ${LDFLAGS} cmd/server/main.go
darwin:
CGO_ENABLE=0 GOOS=darwin GOARCH=amd64 go build -o bin/server-darwin-amd64 ${LDFLAGS} cmd/server/main.go
windows:
CGO_ENABLE=0 GOOS=windows GOARCH=amd64 go build -o bin/server-windows-amd64.exe ${LDFLAGS} cmd/server/main.go
CGO_ENABLE=0 GOOS=windows GOARCH=386 go build -o bin/server-windows-i386.exe ${LDFLAGS} cmd/server/main.go
zip:
zip -r flutter-webrtc-server-bin-${VERSION}.zip bin configs web