status-go/vendor/github.com/koron/go-ssdp/Makefile

72 lines
1.1 KiB
Makefile
Raw Normal View History

2019-06-09 07:24:20 +00:00
EXAMPLES = advertise alive bye monitor search
2021-10-19 13:43:41 +00:00
.PHONY: build
build:
go build -gcflags '-e'
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: test
2019-06-09 07:24:20 +00:00
test:
2021-10-19 13:43:41 +00:00
go test ./...
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: test-race
test-race:
go test -race .
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: tags
tags:
gotags -f tags -R .
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: cover
cover:
mkdir -p tmp
go test -coverprofile tmp/_cover.out .
go tool cover -html tmp/_cover.out -o tmp/cover.html
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: checkall
checkall: vet lint staticcheck
.PHONY: vet
vet:
2019-06-09 07:24:20 +00:00
go vet ./...
2021-10-19 13:43:41 +00:00
.PHONY: lint
lint:
golint ./...
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: staticcheck
staticcheck:
staticcheck ./...
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: clean
2019-06-09 07:24:20 +00:00
clean: examples-clean
2021-10-19 13:43:41 +00:00
go clean
rm -f tags
rm -f tmp/_cover.out tmp/cover.html
# based on: github.com/koron-go/_skeleton/Makefile
2019-06-09 07:24:20 +00:00
2021-10-19 13:43:41 +00:00
.PHONY: examples
2019-06-09 07:24:20 +00:00
examples: examples-build
2021-10-19 13:43:41 +00:00
.PHONY: examples-build
2019-06-09 07:24:20 +00:00
examples-build: $(EXAMPLES)
2021-10-19 13:43:41 +00:00
.PHONY: examples-clean
2019-06-09 07:24:20 +00:00
examples-clean:
rm -f $(EXAMPLES)
advertise: examples/advertise/*.go *.go
go build ./examples/advertise
alive: examples/alive/*.go *.go
go build ./examples/alive
bye: examples/bye/*.go *.go
go build ./examples/bye
monitor: examples/monitor/*.go *.go
go build ./examples/monitor
search: examples/search/*.go *.go
go build ./examples/search