diff options
-rw-r--r-- | Makefile | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -1,18 +1,22 @@ +BINARY=neko +VERSION=0.2 +BUILD=`git rev-parse HEAD` + +LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}" + + SOURCES = $(wildcard *.go) $(wildcard */*.go) BINARIES = nekoweb nekocrawl -DEPS = github.com/mmcdole/gofeed github.com/abbot/go-http-auth github.com/axgle/mahonia github.com/go-sql-driver/mysql github.com/microcosm-cc/bluemonday - -default: $(BINARIES) +default: build +all: clean build_all -$(BINARIES): $(SOURCES) - go build +build: + go build ${LDFLAGS} -o ${BINARY} -.PHONY: deps run +install: + go install -.PHONY: run -deps: - go get $(DEPS) -run: - ./neko -update -serve +docs: + ghmarkdown README.md > readme.html |