add simple Makefile
parent
7c65f49b7c
commit
bfbf5b31ef
|
@ -0,0 +1,26 @@
|
|||
.PHONY: test all build clean
|
||||
|
||||
PROTOFILES=$(shell find . -name \*.proto)
|
||||
PBGOFILES=$(patsubst %.proto,%.pb.go,$(PROTOFILES))
|
||||
GOFILES=$(shell find . -name \*.go)
|
||||
|
||||
# for protoc-gen-go
|
||||
export PATH := $(GOPATH)/bin:$(PATH)
|
||||
|
||||
GOLDFLAGS=-ldflags '-r ${ORIGIN}:${ORIGIN}/../lib'
|
||||
|
||||
all: build test
|
||||
|
||||
imposm3: $(GOFILES) $(PROTOFILES)
|
||||
go build $(GOLDFLAGS)
|
||||
|
||||
build: imposm3
|
||||
|
||||
clean:
|
||||
rm -f imposm3
|
||||
|
||||
test:
|
||||
(cd test && nosetests -v test.py)
|
||||
|
||||
%.pb.go: %.proto
|
||||
protoc --go_out=. $^
|
Loading…
Reference in New Issue