add simple Makefile

master
Oliver Tonnhofer 2013-08-29 16:57:16 +02:00
parent 7c65f49b7c
commit bfbf5b31ef
1 changed files with 26 additions and 0 deletions

26
Makefile Normal file
View File

@ -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=. $^