-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (50 loc) · 1.46 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
all: build
build:
mkdir -p out
# go build -gcflags="all=-N -l" -o ./out/ rtio2/cmd/...
go build -o ./out/ rtio2/cmd/...
mkdir -p out/deviceaccess
# go build -gcflags="all=-N -l" -o ./out/deviceaccess rtio2/internal/deviceaccess/...
go build -gcflags="all=-N -l" -o ./out/deviceaccess rtio2/internal/deviceaccess/...
mkdir -p out/useraccess
go build -gcflags="all=-N -l" -o ./out/useraccess rtio2/internal/useraccess/...
mkdir -p out/examples
go build -gcflags="all=-N -l" -o ./out/examples/ rtio2/examples/...
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -gcflags="all=-N -l" -tags beaglebone -o ./out/examples/printer_beaglebone rtio2/examples/printer_simulation/printer_beaglebone/
clean:
echo "clean all ..."
go clean -i rtio2/...
rm -rf ./out
deps:
GO111MODULE=on go get -d -v rtio2/...
proto:
@ if ! which protoc > /dev/null; then \
echo "error: protoc not installed" >&2; \
exit 1; \
fi
@ if ! which protoc-gen-go > /dev/null; then \
echo "error: protoc-gen-go not installed" >&2; \
exit 1; \
fi
@ if ! which protoc-gen-go-grpc > /dev/null; then \
echo "error: protoc-gen-go-grpc not installed" >&2; \
exit 1; \
fi
@ if ! which protoc-gen-grpc-gateway > /dev/null; then \
echo "error: protoc-gen-grpc-gateway not installed" >&2; \
exit 1; \
fi
go generate rtio2/...
proto-clean:
./scripts/proto-to-go.sh clean
test:
go test -cpu 1,4 -timeout 7m rtio2/...
.PHONY: \
all \
build \
clean \
proto \
test \
testrace \
vet \
vetdeps