forked from fujiwara/kinesis-tailf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (17 loc) · 902 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
GIT_VER := $(shell git describe --tags)
DATE := $(shell date +%Y-%m-%dT%H:%M:%S%z)
.PHONY: test install clean all
all: cmd/kinesis-tailf/kinesis-tailf cmd/kinesis-cat/kinesis-cat
cmd/kinesis-tailf/kinesis-tailf: *.go cmd/kinesis-tailf/*.go go.*
cd cmd/kinesis-tailf && go build -ldflags "-s -w -X main.version=${GIT_VER} -X main.buildDate=${DATE}" -gcflags="-trimpath=${PWD}"
cmd/kinesis-cat/kinesis-cat: *.go cmd/kinesis-cat/*.go go.*
cd cmd/kinesis-cat && go build -ldflags "-s -w -X main.version=${GIT_VER} -X main.buildDate=${DATE}" -gcflags="-trimpath=${PWD}"
install: cmd/kinesis-tailf/kinesis-tailf cmd/kinesis-cat/kinesis-cat
install cmd/kinesis-tailf/kinesis-tailf cmd/kinesis-cat/kinesis-cat ${GOPATH}/bin
test:
go test -race ./...
clean:
rm -f cmd/kinesis-tailf/kinesis-tailf cmd/kinesis-cat/kinesis-cat
rm -f pkg/*
gen:
protoc --go_out=paths=source_relative:kpl/ ./kpl.proto