diff options
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07d2507 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +.POSIX: +.SUFFIXES: + +GO = go +RM = rm +GOFLAGS = -o crawl +PREFIX = /usr/local +BINDIR = $(PREFIX)/bin + +goflags = $(GOFLAGS) + +all: keep + +keep: + $(GO) build $(goflags) -ldflags "-X main.buildPrefix=$(PREFIX)" ./cmd/crawl + +clean: + $(RM) -f crawl + +test: + $(GO) test -v ./... + +install: all + mkdir -p $(DESTDIR)$(BINDIR) + cp -f crawl $(DESTDIR)$(BINDIR) + |