2018-03-08 14:07:14 -08:00
|
|
|
.PHONY: default
|
|
|
|
default: bin/hw bin/hwc bin/hwl
|
|
|
|
|
2018-03-08 16:09:51 -08:00
|
|
|
VERSION := $(shell git describe --tags 2> /dev/null || echo "unreleased")
|
|
|
|
V_DIRTY := $(shell git describe --exact-match HEAD 2> /dev/null > /dev/null || echo "-unreleased")
|
2018-03-08 13:45:40 -08:00
|
|
|
bin/hw: cmd/hw/main.go bin
|
2018-03-08 16:09:51 -08:00
|
|
|
@GOOS=linux go build -ldflags \
|
|
|
|
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY)" \
|
|
|
|
-v -o bin/hw ./cmd/hw
|
2018-01-09 16:31:38 -08:00
|
|
|
|
2018-03-08 14:07:14 -08:00
|
|
|
bin/hwc: cmd/hwc/main.go bin
|
2018-03-08 16:09:51 -08:00
|
|
|
@GOOS=linux go build -ldflags \
|
|
|
|
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY)" \
|
|
|
|
-v -o bin/hwc ./cmd/hwc
|
2018-03-08 14:07:14 -08:00
|
|
|
|
|
|
|
bin/hwl: cmd/hwl/main.go bin
|
2018-03-08 16:09:51 -08:00
|
|
|
@GOOS=linux go build -ldflags \
|
|
|
|
"-X mcquay.me/hw.Version=$(VERSION)$(V_DIRTY)" \
|
|
|
|
-v -o bin/hwl ./cmd/hwl
|
2018-03-08 14:07:14 -08:00
|
|
|
|
2018-01-09 16:31:38 -08:00
|
|
|
bin:
|
|
|
|
mkdir bin
|