smithy

commit e4b24bd9b86f91e590ca0df270d249039a3503b2

Author: Honza Pokorny <me@honza.ca>

Add a statik target to makefile

Previously, you had to install the undocumented statik tool in order to
run `make`.  Now, this is handled automatically.

Closes #3

 .gitignore | 1 +
 Makefile | 9 +++++++--


diff --git a/.gitignore b/.gitignore
index c05e7776daf1f9aa60b4f0b9c25d16fb97a514e2..127383265896bb71da9e728c37716c1179fb8a96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 repos
+bin




diff --git a/Makefile b/Makefile
index 0b3ce0bbf9d4f848775f700b30609525339fd65a..a10043eafa5f4f23151791105d219abd65f975a5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,14 @@ BUILD_VERSION ?= $(shell git describe --always --abbrev=40 --dirty)
 
 LDFLAGS="-X github.com/honza/smithy/cmd.SmithyVersion=${BUILD_VERSION}"
 
-all:
-	statik -src=include -dest=pkg -f -m
+all: bin/statik
+	bin/statik -src=include -dest=pkg -f -m
 	CGO_ENABLED=0 go build -ldflags $(LDFLAGS) -o smithy main.go
+
+bin/statik:
+	mkdir -p bin
+	go mod download
+	go build -o bin/statik $(GOPATH)/src/github.com/rakyll/statik/statik.go
 
 gofmt:
 	go fmt ./pkg/... ./cmd/...