Build for local GOOS

If you want to build for linux, set GOOS
This commit is contained in:
Stephen McQuay 2018-03-08 16:22:19 -08:00
parent 9c946beefb
commit 1c60f1e0e5
Signed by: sm
GPG Key ID: 4E4B72F479BA3CE5

View File

@ -7,19 +7,19 @@ GIT := $(shell git rev-parse --short HEAD)
DIRTY := $(shell git diff-index --quiet HEAD 2> /dev/null > /dev/null || echo "-dirty")
bin/hw: cmd/hw/main.go bin
@GOOS=linux go build -ldflags \
@go build -ldflags \
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY) \
-X mcquay.me/hw.Git=$(GIT)$(DIRTY)" \
-v -o bin/hw ./cmd/hw
bin/hwc: cmd/hwc/main.go bin
@GOOS=linux go build -ldflags \
@go build -ldflags \
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY) \
-X mcquay.me/hw.Git=$(GIT)$(DIRTY)" \
-v -o bin/hwc ./cmd/hwc
bin/hwl: cmd/hwl/main.go bin
@GOOS=linux go build -ldflags \
@go build -ldflags \
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY) \
-X mcquay.me/hw.Git=$(GIT)$(DIRTY)" \
-v -o bin/hwl ./cmd/hwl