added support for config files, openbsd, pledge and unveil

This commit is contained in:
ston1th 2018-10-26 17:28:50 +02:00
commit 375933c7bc
14 changed files with 138 additions and 49 deletions

View file

@ -4,6 +4,7 @@ VERSION=$(shell cat VERSION)
GCFLAGS=-gcflags '-e'
LDFLAGS=-ldflags '-X main.version=$(VERSION) -s -w'
PROGRAM=gowiki
ENV=CGO_ENABLED=0
all: $(PROGRAM)
@ -11,10 +12,10 @@ setup:
$(CC) get github.com/client9/misspell
vendor: clean codeqa
CGO_ENABLED=0 $(CC) $(BUILD) -mod=vendor $(LDFLAGS)
$(ENV) $(CC) $(BUILD) -mod=vendor $(LDFLAGS)
$(PROGRAM): clean codeqa
CGO_ENABLED=0 $(CC) $(BUILD) $(LDFLAGS)
$(ENV) $(CC) $(BUILD) $(LDFLAGS)
clean:
$(CC) clean -x
@ -36,9 +37,13 @@ misspell:
test:
ifeq ($(shell go env GOARCH), $(shell go env GOHOSTARCH))
ifeq ($(shell go env GOOS), $(shell go env GOHOSTOS))
$(CC) test ./...
else
$(info skipping tests of other platforms)
endif
else
$(info skipping tests of other platforms)
endif
.PHONY: setup vendor build clean codeqa generate gofmt golint misspell test