-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (28 loc) · 892 Bytes
/
Makefile
File metadata and controls
42 lines (28 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
gofiles := $(shell find . -name '*.go')
goflag :=
all: test
test:
go test -v ./...
cover:
go test -coverprofile=coverage.out ./...
@echo To view coverage graph use go tool cover -html=coverage.out
golint:
go fmt ./...
go vet ./...
build: build-cli build-examples
build-cli: bin/jsonrpc-call bin/jsonrpc-notify bin/jsonrpc-watch bin/jsonrpc-benchmark
bin/jsonrpc-call: ${gofiles}
go build $(goflag) -o $@ cli/call/main.go
bin/jsonrpc-notify: ${gofiles}
go build $(goflag) -o $@ cli/notify/main.go
bin/jsonrpc-watch: ${gofiles}
go build $(goflag) -o $@ cli/watch/main.go
bin/jsonrpc-benchmark: ${gofiles}
go build $(goflag) -o $@ cli/benchmark/main.go
clean:
rm -rf build dist bin/*
build-examples: bin/jsoff-example-fifo
bin/jsoff-example-fifo: ${gofiles}
go build $(goflag) -o $@ examples/fifo/main.go
.PHONY: test gofmt build-cli clean
.SECONDARY: $(buildarchdirs)