From a15f888a560d06b60b06354cd1446d62b6aaf52b Mon Sep 17 00:00:00 2001 From: Joshua Harshman Date: Fri, 7 May 2021 23:24:39 -0600 Subject: [PATCH] Add makefile with test, build, and install targets (#6) --- Makefile | 15 +++++++++++++++ tscli/Makefile | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 Makefile create mode 100644 tscli/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e6e95fe --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.PHONY: test +test: + go test -v ./... + +.PHONY: build +build: + make -C tscli + +.PHONY: install +install: build + cp ./bin/tscli /usr/local/bin/ + +.PHONY: clean +clean: + rm -rf ./bin diff --git a/tscli/Makefile b/tscli/Makefile new file mode 100644 index 0000000..f81515a --- /dev/null +++ b/tscli/Makefile @@ -0,0 +1,8 @@ +BINDIR ?= ../bin + +default: build + +.PHONY: build +build: + @mkdir -p $(BINDIR) + GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o $(BINDIR)/tscli