aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 237e631..7cdbd93 100644
--- a/Makefile
+++ b/Makefile
@@ -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