2012-08-23 11:44:04 -04:00
|
|
|
|
|
|
|
EXEC = protoc
|
2012-09-09 07:43:59 -04:00
|
|
|
#PROTO = core.proto peers.proto system.proto chat.proto search.proto files.proto gxs.proto msgs.proto
|
|
|
|
PROTO = core.proto peers.proto system.proto chat.proto search.proto files.proto
|
2012-08-23 11:44:04 -04:00
|
|
|
|
|
|
|
PROTOPATH = ./definition
|
2012-08-25 07:41:39 -04:00
|
|
|
#CDESTPATH = ./gencc
|
|
|
|
CDESTPATH = ../../retroshare-nogui/src/rpc/proto/gencc
|
2012-10-22 15:07:54 -04:00
|
|
|
PYDESTPATH = ./genpy
|
|
|
|
#PYDESTPATH = ../../../../github/pyrs/pyrs/proto
|
2012-08-23 11:44:04 -04:00
|
|
|
|
|
|
|
CLIST = $(PROTO:%.proto=%.cc)
|
|
|
|
CCODE = $(patsubst %.proto,$(CDESTPATH)/%.pb.cc, $(PROTO))
|
|
|
|
HCODE = $(patsubst %.proto,$(CDESTPATH)/%.pb.h, $(PROTO))
|
|
|
|
PYCODE = $(patsubst %.proto,$(PYDESTPATH)/%_pb2.py, $(PROTO))
|
|
|
|
|
|
|
|
|
2013-02-22 15:51:24 -05:00
|
|
|
all: allc python_proto
|
2012-10-22 15:07:54 -04:00
|
|
|
|
|
|
|
allc: $(CCODE)
|
2012-08-23 11:44:04 -04:00
|
|
|
echo $(CCODE)
|
|
|
|
|
2012-10-22 15:07:54 -04:00
|
|
|
python_proto: $(PYCODE)
|
|
|
|
echo $(PYCODE)
|
2012-08-23 11:44:04 -04:00
|
|
|
|
|
|
|
$(CDESTPATH)/%.pb.cc : $(PROTOPATH)/%.proto
|
|
|
|
$(EXEC) --proto_path=$(PROTOPATH) --cpp_out=$(CDESTPATH) $<
|
|
|
|
|
|
|
|
$(PYDESTPATH)/%_pb2.py : $(PROTOPATH)/%.proto
|
|
|
|
$(EXEC) --proto_path=$(PROTOPATH) --python_out=$(PYDESTPATH) $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-/bin/rm $(CCODE) $(HCODE) $(PYCODE)
|