From 3c66c2e6418246e8b802a6ad101ac752ac11eb25 Mon Sep 17 00:00:00 2001 From: "kenton@google.com" Date: Mon, 3 Aug 2009 21:31:25 +0000 Subject: Allow dependents to use pkg-config to figure out what flags to pass to link against protobuf. --- examples/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3