diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6653599 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +BIN := pdfstamp +CC ?= cc + +build: + CC=$(CC) CGO_ENABLED=1 go build -tags musl \ + -ldflags '-linkmode external -extldflags -static' -o $(BIN) . + +test: + CC=$(CC) CGO_ENABLED=1 go vet -tags musl ./... + CC=$(CC) CGO_ENABLED=1 go test -tags musl ./... + +fmt: + gofmt -w *.go + +run: build + ./$(BIN) pick example.pdf -o plan.json + +clean: + rm -f $(BIN) + +.PHONY: build test fmt run clean |