-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 704 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 704 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
CAPNP_LANG ?= c++
FLATC_LANG ?= cpp
PROTO_LANG ?= cpp
CAPNP_SRC = capnproto/sweCommon3.capnp
FBS_SRC = flatbuffers/sweCommon3.fbs
PROTO_SRC = protobuf/sweCommon3.proto
CAPNP_OUT = gen/capnproto
FBS_OUT = gen/flatbuffers
PROTO_OUT = gen/protobuf
.PHONY: all capnproto flatbuffers protobuf clean
all: capnproto flatbuffers protobuf
capnproto: $(CAPNP_OUT)
capnp compile -o$(CAPNP_LANG):$(CAPNP_OUT) --src-prefix=capnproto $(CAPNP_SRC)
flatbuffers: $(FBS_OUT)
flatc --$(FLATC_LANG) -o $(FBS_OUT) $(FBS_SRC)
protobuf: $(PROTO_OUT)
protoc --$(PROTO_LANG)_out=$(PROTO_OUT) --proto_path=protobuf $(PROTO_SRC)
$(CAPNP_OUT) $(FBS_OUT) $(PROTO_OUT):
mkdir -p $@
clean:
rm -rf gen/