-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 1.1 KB
/
Makefile
File metadata and controls
40 lines (29 loc) · 1.1 KB
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
PROTO_SRC=api/datastream
PROTO_DST=generated/datastream
PROTOC_CMD = protoc
PROTOC_OPTS = -I $(PROTO_SRC) $< --go-grpc_out=. --go_out=.
# The target of the makefile
.PHONY: all
all: $(PROTO_DST)/*.pb.go server server-sqlite server-git server-s3 client updater
# Compile the Protocol Buffer definitions
$(PROTO_DST)/%.pb.go: $(PROTO_SRC)/*.proto
@mkdir -p $(PROTO_DST)
$(PROTOC_CMD) $(PROTOC_OPTS) $<
# Compile the server
server: $(PROTO_DST)/*.pb.go examples/server/*.go
go build -o $@ examples/server/main.go
# Compile the server
server-sqlite: $(PROTO_DST)/*.pb.go examples/server-sqlite/*.go
go build -o $@ examples/server-sqlite/main.go
# Compile the server
server-git: $(PROTO_DST)/*.pb.go examples/server-git/*.go
go build -o $@ examples/server-git/main.go
# Compile the server
server-s3: $(PROTO_DST)/*.pb.go examples/server-s3/*.go
go build -o $@ examples/server-s3/main.go
# Compile the client
client: $(PROTO_DST)/*.pb.go examples/client/*.go
go build -o $@ examples/client/main.go
# Compile the client
updater: $(PROTO_DST)/*.pb.go examples/updater/*.go
go build -o $@ examples/updater/main.go