gowiki/Makefile
2018-02-07 21:41:54 +01:00

34 lines
549 B
Makefile

CC=go
BUILD=build -v
VERSION=$(shell cat VERSION)
GCFLAGS=-gcflags '-e'
LDFLAGS=-ldflags '-X main.version=$(VERSION) -s -w'
PROGRAM=gowiki
all: $(PROGRAM)
setup:
$(CC) get github.com/tools/godep
$(CC) get github.com/client9/misspell
$(PROGRAM): clean codeqa
CGO_ENABLED=0 $(CC) $(BUILD) $(LDFLAGS)
clean:
$(CC) clean -x
codeqa: templates gofmt misspell golint
gofmt:
gofmt -w .
golint:
$(GOPATH)/bin/golint .
misspell:
$(GOPATH)/bin/misspell **/*
templates:
$(CC) generate
.PHONY: setup build clean templates gofmt misspell golint