bovarys.me/fudge@v0.4.0/Makefile (about) 1 APP=fudge 2 OUTPUT=build 3 4 .PHONY: all checksum clean coverage generate linux-amd64 openbsd-amd64 test 5 6 all: linux-amd64 openbsd-amd64 checksum 7 8 generate: 9 go generate 10 11 linux-amd64: generate 12 GOOS=linux GOARCH=amd64 go build -o $(OUTPUT)/$(APP)-$@ main.go 13 tar --transform="flags=r;s|$(OUTPUT)/$(APP)-$@|fudge|" \ 14 -czf $(OUTPUT)/fudge-$@.tar.gz \ 15 $(OUTPUT)/$(APP)-$@ static/ template/ 16 17 openbsd-amd64: generate 18 GOOS=openbsd GOARCH=amd64 go build -o $(OUTPUT)/$(APP)-$@ main.go 19 tar --transform="flags=r;s|$(OUTPUT)/$(APP)-$@|fudge|" \ 20 -czf $(OUTPUT)/fudge-$@.tar.gz \ 21 $(OUTPUT)/$(APP)-$@ static/ template/ 22 23 checksum: 24 cd $(OUTPUT) && sha256sum -b $(APP)-*.tar.gz > sha256sum.txt 25 26 clean: 27 rm -rf $(OUTPUT)/$(APP)-* $(OUTPUT)/sha256sum.txt 28 29 test: 30 go test -coverprofile=cover.out ./... 31 32 coverage: test 33 go tool cover -html=cover.out