summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7c338ee
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+PKG = github.com/majewsky/rtree
+PREFIX = /usr
+
+all: build/rtree
+
+GO = GOPATH=$(CURDIR)/.gopath GOBIN=$(CURDIR)/build go
+GO_BUILDFLAGS =
+GO_LDFLAGS = -s -w
+
+build/rtree: FORCE
+ $(GO) install $(GO_BUILDFLAGS) -ldflags '$(GO_LDFLAGS)' '$(PKG)'
+
+install: FORCE all
+ install -D -m 0755 build/rtree "$(DESTDIR)$(PREFIX)/bin/rtree"
+
+vendor: FORCE
+ golangvend
+
+.PHONY: FORCE