-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
22 lines (17 loc) · 985 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
KEY_SALT:=$(shell openssl rand -hex 64)
VERSION=0.0.1
GOBIN=go
.PHONY: build
build: build-linux build-windows build-darwin
.PHONY: build-linux
build-linux:
mkdir -p dist
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ${GOBIN} build -ldflags="-extldflags=-static -w -s -X dominicbreuker/goncat/pkg/config.KeySalt=${KEY_SALT} -X dominicbreuker/goncat/cmd/version.Version=${VERSION}" -o dist/goncat.elf cmd/main.go
.PHONY: build-windows
build-windows:
mkdir -p dist
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ${GOBIN} build -ldflags="-extldflags=-static -w -s -X dominicbreuker/goncat/pkg/config.KeySalt=${KEY_SALT} -X dominicbreuker/goncat/cmd/version.Version=${VERSION}" -o dist/goncat.exe cmd/main.go
.PHONY: build-darwin
build-darwin:
mkdir -p dist
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 ${GOBIN} build -ldflags="-extldflags=-static -w -s -X dominicbreuker/goncat/pkg/config.KeySalt=${KEY_SALT} -X dominicbreuker/goncat/cmd/version.Version=${VERSION}" -o dist/goncat.macho cmd/main.go