Skip to content

Commit a15f888

Browse files
authored
Add makefile with test, build, and install targets (#6)
1 parent c71b862 commit a15f888

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.PHONY: test
2+
test:
3+
go test -v ./...
4+
5+
.PHONY: build
6+
build:
7+
make -C tscli
8+
9+
.PHONY: install
10+
install: build
11+
cp ./bin/tscli /usr/local/bin/
12+
13+
.PHONY: clean
14+
clean:
15+
rm -rf ./bin

tscli/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
BINDIR ?= ../bin
2+
3+
default: build
4+
5+
.PHONY: build
6+
build:
7+
@mkdir -p $(BINDIR)
8+
GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o $(BINDIR)/tscli

0 commit comments

Comments
 (0)