2017-09-22 09:44:56 -04:00
|
|
|
GOROOT ?= $(shell go env GOROOT)
|
2017-09-12 13:08:26 -04:00
|
|
|
GO ?= $(GOROOT)/bin/go
|
2017-04-03 10:00:38 -04:00
|
|
|
REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
2017-09-12 13:08:26 -04:00
|
|
|
VERSION=$(shell $(GO) version | cut -d' ' -f3)
|
2018-05-06 08:05:31 -04:00
|
|
|
GOARCH ?= $(shell go env GOARCH)
|
|
|
|
|
GOOS ?= $(shell go env GOOS)
|
|
|
|
|
GOARM ?= $(shell go env GOARM)
|
2017-09-12 13:08:26 -04:00
|
|
|
all: build
|
2016-12-14 17:45:44 -05:00
|
|
|
|
2017-09-12 13:08:26 -04:00
|
|
|
build: srndv2
|
|
|
|
|
|
2017-10-24 05:35:09 -04:00
|
|
|
srndv2:
|
2018-05-06 08:05:31 -04:00
|
|
|
GOARM=$(GOARM) GOOS=$(GOOS) GOARCH=$(GOARCH) GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) build -ldflags "-X srnd.GitVersion=-$(shell git rev-parse --short HEAD)" -v
|
2016-12-14 17:45:44 -05:00
|
|
|
|
2017-10-13 07:58:10 -04:00
|
|
|
srndv2-lua:
|
|
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) build -ldflags "-X srnd.GitVersion=-$(shell git rev-parse --short HEAD)" -tags lua -v
|
|
|
|
|
|
2016-12-14 17:45:44 -05:00
|
|
|
clean:
|
2017-09-12 13:08:26 -04:00
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) clean -v
|
2017-08-26 10:41:28 -04:00
|
|
|
|
|
|
|
|
test:
|
2017-09-24 08:18:56 -04:00
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) test srnd
|