keycard-go/Makefile

22 lines
596 B
Makefile
Raw Normal View History

2018-11-28 11:44:09 +00:00
.PHONY: test build
2018-11-08 14:03:50 +00:00
GOBIN = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))build/bin
2019-03-01 17:44:07 +00:00
PROJECT_NAME=keycard-go
GO_PROJECT_PATH=github.com/status-im/$(PROJECT_NAME)
2019-03-01 17:44:07 +00:00
BIN_NAME=keycard
DOCKER_IMAGE_NAME=keycard
2018-11-08 14:03:50 +00:00
build:
2019-03-01 17:44:07 +00:00
go build -i -o $(GOBIN)/$(BIN_NAME) -v ./cmd/keycard
2018-11-08 14:03:50 +00:00
@echo "Compilation done."
2019-03-01 17:44:07 +00:00
@echo "Run \"./build/bin/$(BIN_NAME) -h\" to view available commands."
2019-02-15 15:32:37 +00:00
test:
go test -v ./...
build-docker-image:
docker build -t $(DOCKER_IMAGE_NAME) -f _assets/Dockerfile .
build-platforms:
xgo -image $(DOCKER_IMAGE_NAME) --dest $(GOBIN) --targets=linux/amd64,windows/amd64 ./cmd/$(BIN_NAME)