编译c++ demo

BOOST_DIR = /usr/local/boost/include
THRIFT_DIR = /usr/local/thrift-0.9.0/include
THRIFT_DIR_MORE = /usr/local/thrift-0.9.0/include/thrift
LIB_DIR = /usr/local/thrift-0.9.0/lib

GEN_SRC = ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp

default: server client

server: CppServer.cpp
  g++ -Wall -O2  -DHAVE_NETINET_IN_H -o CppServer -I${THRIFT_DIR} -I${THRIFT_DIR_MORE} -I${BOOST_DIR}  -I../gen-cpp -L${LIB_DIR} CppServer.cpp ${GEN_SRC} -lthrift

client: CppClient.cpp
  g++ -Wall -O2 -DHAVE_NETINET_IN_H -o CppClient -I${THRIFT_DIR} -I${BOOST_DIR}  -I../gen-cpp -L${LIB_DIR} CppClient.cpp ${GEN_SRC} -lthrift

clean:
  $(RM) -r CppClient CppServer

你可能感兴趣的:(编译c++ demo)