Roger Meier | 122803b | 2012-06-18 20:23:58 +0000 | [diff] [blame] | 1 | THRIFT_DIR =../.. |
| 2 | INCS_DIRS =-I${THRIFT_DIR}/lib/cpp/src -I. |
| 3 | THRIFT_LIB =${THRIFT_DIR}/lib/cpp/.libs/libthrift.a |
| 4 | BOOST_LIB = |
| 5 | CPP_DEFS = |
| 6 | CPP_OPTS =-Wall -O2 |
| 7 | |
| 8 | GEN_SRC = gen-cpp/SampleService.cpp \ |
| 9 | gen-cpp/Sample_types.cpp \ |
| 10 | gen-cpp/SampleCallback.cpp \ |
| 11 | gen-cpp/Sample_constants.cpp |
| 12 | GEN_INC = -Igen-cpp |
| 13 | |
| 14 | default: server client |
| 15 | .PHONY: server client |
| 16 | |
| 17 | server: |
| 18 | g++ ${CPP_OPTS} ${CPP_DEFS} -o server/server ${GEN_INC} ${INCS_DIRS} server/server.cpp ${GEN_SRC} ${THRIFT_LIB} ${BOOST_LIB} |
| 19 | |
| 20 | client: |
| 21 | g++ ${CPP_OPTS} ${CPP_DEFS} -o client/client ${GEN_INC} ${INCS_DIRS} client/client.cpp ${GEN_SRC} ${THRIFT_LIB} ${BOOST_LIB} |
| 22 | |
| 23 | clean: |
| 24 | $(RM) -r client/client server/server |
| 25 | |