diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-08-03 21:31:25 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-08-03 21:31:25 +0000 |
commit | 3c66c2e6418246e8b802a6ad101ac752ac11eb25 (patch) | |
tree | f8f6720f22f1ecc9bd45c82f9b8b722fcbb6dfc9 /examples/Makefile | |
parent | ad2cfe03751debb67a61bc4e4a2047ff9a235a8f (diff) | |
download | protobuf-3c66c2e6418246e8b802a6ad101ac752ac11eb25.tar.gz protobuf-3c66c2e6418246e8b802a6ad101ac752ac11eb25.tar.bz2 protobuf-3c66c2e6418246e8b802a6ad101ac752ac11eb25.zip |
Allow dependents to use pkg-config to figure out what flags to pass to link against protobuf.
Diffstat (limited to 'examples/Makefile')
-rw-r--r-- | examples/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/Makefile b/examples/Makefile index 36d0280b..8dc90836 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -22,10 +22,12 @@ protoc_middleman: addressbook.proto @touch protoc_middleman add_person_cpp: add_person.cc protoc_middleman - c++ add_person.cc addressbook.pb.cc -lprotobuf -lpthread -o add_person_cpp + pkg-config --cflags protobuf # fails if protobuf is not installed + c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` list_people_cpp: list_people.cc protoc_middleman - c++ list_people.cc addressbook.pb.cc -lprotobuf -lpthread -o list_people_cpp + pkg-config --cflags protobuf # fails if protobuf is not installed + c++ 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 |