I have 4 files
message.proto
udp.h
udp.cpp
main.cpp
message.proto is a google protocol buffer file. I am trying to write a protocol buffer and send and receive data using UDP. udp.h and udp.cpp are just classes to implement UDP.
I can write my own makefile and do the needful for this small example. Later I would require to integrate this code into my QT program. I am using qmake -project, qmake to generate the Makefile. I am using Ubuntu 9.10
Could some one tell me the changes I need to make in the .pro file or the Makefile generated by qmake to satisfy the dependencies.
Usually you just need to add the respective header and source files to the corresponding
HEADERSandSOURCESvariables in the .pro file, i.e.where I implicity assumed that message.pb.cc and message.pb.h are the files generated by
protoc(the protocol buffer compiler). If you additionally want the generated makefile to runprotocfor you, you can accomplish that with thesystemfunction (http://doc.trolltech.com/4.6/qmake-function-reference.html#system-command).I hope that helps.