mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
450585b74b
Summary: -- this should fix the library mismatch issue.. From the gcc linking guide: LIBRARY_PATH The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH. When configured as a native compiler, GCC tries the directories thus specified when searching for special linker files, if it can't find them using GCC_EXEC_PREFIX. Linking using GCC also uses these directories when searching for ordinary libraries for the -l option (but directories specified with -L come first). git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664790 13f79535-47bb-0310-9956-ffa450edef68
58 lines
1.3 KiB
Thrift
58 lines
1.3 KiB
Thrift
# Makefile for Thrift test project.
|
|
#
|
|
# Author:
|
|
# Mark Slee <mcslee@facebook.com>
|
|
|
|
# Default target is everything
|
|
|
|
ifndef thrift_home
|
|
thrift_home=../..
|
|
endif #thrift_home
|
|
|
|
target: all
|
|
|
|
ifndef boost_home
|
|
#boost_home=../../../../../thirdparty/boost_1_33_1
|
|
boost_home=/usr/local/include/boost-1_33_1
|
|
endif #boost_home
|
|
target: all
|
|
|
|
include_paths = $(thrift_home)/lib/cpp/src \
|
|
$(boost_home)
|
|
|
|
include_flags = $(patsubst %,-I%, $(include_paths))
|
|
|
|
# Tools
|
|
ifndef THRIFT
|
|
THRIFT = ../../compiler/cpp/bin/thrift
|
|
endif # THRIFT
|
|
|
|
CC = g++
|
|
LD = g++
|
|
|
|
# Compiler flags
|
|
DCFL = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp -lthrift
|
|
CFL = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp -lthrift
|
|
|
|
all: server client
|
|
|
|
debug: server-debug client-debug
|
|
|
|
stubs: ../ThriftTest.thrift
|
|
$(THRIFT) --cpp ../ThriftTest.thrift
|
|
|
|
server-debug: stubs
|
|
g++ -o TestServer $(DCFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
|
|
|
|
client-debug: stubs
|
|
g++ -o TestClient $(DCFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
|
|
|
|
server: stubs
|
|
g++ -o TestServer $(CFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
|
|
|
|
client: stubs
|
|
g++ -o TestClient $(CFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
|
|
|
|
clean:
|
|
rm -fr TestServer TestClient gen-cpp
|