首页 > 代码库 > protobuf example make backup
protobuf example make backup
# See README.txt..PHONY: all cpp java python cleanall: cpp #java pythoncpp: add_person_cpp list_people_cpp temp_cppjava: add_person_java list_people_javapython: add_person_python list_people_pythonclean: rm -f add_person_cpp list_people_cpp add_person_java list_people_java add_person_python list_people_python rm -f javac_middleman AddPerson*.class ListPeople*.class com/example/tutorial/*.class rm -f protoc_middleman addressbook.pb.cc addressbook.pb.h addressbook_pb2.py com/example/tutorial/AddressBookProtos.java rm -f *.pyc rmdir com/example/tutorial 2>/dev/null || true rmdir com/example 2>/dev/null || true rmdir com 2>/dev/null || trueprotoc_middleman: addressbook.proto protoc --cpp_out=. --java_out=. --python_out=. addressbook.proto @touch protoc_middlemantemp_cpp: temp.c++ protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed c++ -g -O0 add_person.cc addressbook.pb.cc -o temp_cpp `pkg-config --cflags --libs protobuf`add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed c++ -g -O0 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed c++ -g -O0 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`javac_middleman: AddPerson.java ListPeople.java protoc_middleman javac AddPerson.java ListPeople.java com/example/tutorial/AddressBookProtos.java @touch javac_middlemanadd_person_java: javac_middleman @echo "Writing shortcut script add_person_java..." @echo ‘#! /bin/sh‘ > add_person_java @echo ‘java -classpath .:$$CLASSPATH AddPerson "$$@"‘ >> add_person_java @chmod +x add_person_javalist_people_java: javac_middleman @echo "Writing shortcut script list_people_java..." @echo ‘#! /bin/sh‘ > list_people_java @echo ‘java -classpath .:$$CLASSPATH ListPeople "$$@"‘ >> list_people_java @chmod +x list_people_javaadd_person_python: add_person.py protoc_middleman @echo "Writing shortcut script add_person_python..." @echo ‘#! /bin/sh‘ > add_person_python @echo ‘./add_person.py "$$@"‘ >> add_person_python @chmod +x add_person_pythonlist_people_python: list_people.py protoc_middleman @echo "Writing shortcut script list_people_python..." @echo ‘#! /bin/sh‘ > list_people_python @echo ‘./list_people.py "$$@"‘ >> list_people_python @chmod +x list_people_python
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。