From: Mark Slee Date: Thu, 25 Jan 2007 08:14:50 +0000 (+0000) Subject: Separate thrift into libthrift and libthriftnb X-Git-Tag: 0.2.0~1521 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=0788a70568640d0709e3655ba782b186fc9d9526;p=common%2Fthrift.git Separate thrift into libthrift and libthriftnb Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link. Reviewed By: makefile git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am index 932e802f..20abe527 100644 --- a/lib/cpp/Makefile.am +++ b/lib/cpp/Makefile.am @@ -1,4 +1,4 @@ -lib_LTLIBRARIES = libthrift.la +lib_LTLIBRARIES = libthrift.la libthriftnb.la common_cxxflags = -Wall -Isrc $(BOOST_CPPFLAGS) $(EVENT_CPPFLAGS) common_ldflags = -Wall $(BOOST_LDFLAGS) $(EVENT_LDFLAGS) @@ -17,15 +17,18 @@ libthrift_sources = src/concurrency/Mutex.cpp \ src/transport/TServerSocket.cpp \ src/transport/TTransportUtils.cpp \ src/server/TSimpleServer.cpp \ - src/server/TThreadPoolServer.cpp \ - src/server/TNonblockingServer.cpp + src/server/TThreadPoolServer.cpp + +libthriftnb_sources = src/server/TNonblockingServer.cpp libthrift_la_SOURCES = $(libthrift_sources) +libthriftnb_la_SOURCES = $(libthriftnb_sources) libthrift_cxxflags = $(common_cxxflags) libthrift_ldflags = $(common_ldflags) libthrift_la_CXXFLAGS = $(libthrift_cxxflags) +libthriftnb_la_CXXFLAGS = $(libthrift_cxxflags) include_thriftdir = $(includedir)/thrift include_thrift_HEADERS = \ diff --git a/test/cpp/Makefile.thrift b/test/cpp/Makefile.thrift index b8bcd44e..9eb1dcee 100644 --- a/test/cpp/Makefile.thrift +++ b/test/cpp/Makefile.thrift @@ -31,8 +31,8 @@ CC = g++ LD = g++ # Compiler flags -DCFL = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -levent -LFL = -L$(thrift_home)/lib/cpp/.libs -lthrift -levent +DCFL = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent +LFL = -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent CCFL = -Wall -O3 -I./gen-cpp $(include_flags) CFL = $(CCFL) $(LFL) @@ -60,4 +60,4 @@ small: g++ -c $(CCFL) ./gen-cpp/SmallService.cpp ./gen-cpp/SmallTest_types.cpp clean: - rm -fr TestServer TestClient gen-cpp + rm -fr *.o TestServer TestClient gen-cpp