-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (20 loc) · 892 Bytes
/
Makefile
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
27
28
29
# Recipes for building, testing and releasing dnaglider
GOFILES = $(shell find . -name '*.go')
VERSION="0.0.5"
default: release
build/:
mkdir -p $@
.PHONY: deps
deps:
go get -d github.com/cmdoret/dnaglider/dnaglider
build/dnaglider-windows.exe: $(GOFILES) build/ deps
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$(VERSION)" -o $@ ./dnaglider/
build/dnaglider-osx: $(GOFILES) build/ deps
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$(VERSION)" -o $@ ./dnaglider/
build/dnaglider-linux: $(GOFILES) build/ deps
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$(VERSION)" -o $@ ./dnaglider/
.PHONY: release
release: build/dnaglider-linux build/dnaglider-windows.exe build/dnaglider-osx
.PHONY: test
test: deps
cd dnaglider/pkg ; go test -race -coverprofile=../../coverage.txt -covermode=atomic