Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 1 | # Makefile for Thrift test project. |
| 2 | # |
| 3 | # Author: |
| 4 | # Mark Slee <mcslee@facebook.com> |
| 5 | |
| 6 | # Default target is everything |
| 7 | target: all |
| 8 | |
| 9 | # Tools |
| 10 | THRIFT = /usr/local/bin/thrift |
| 11 | CC = g++ |
| 12 | LD = g++ |
| 13 | |
| 14 | # Compiler flags |
| 15 | LIBS = ../../lib/cpp/server/TSimpleServer.cc \ |
| 16 | ../../lib/cpp/protocol/TBinaryProtocol.cc \ |
| 17 | ../../lib/cpp/transport/TServerSocket.cc \ |
| 18 | ../../lib/cpp/transport/TSocket.cc |
| 19 | CFL = -Wall -g -I../../lib/cpp $(LIBS) |
| 20 | CFL = -Wall -g -lthrift -I../../lib/cpp |
| 21 | |
| 22 | all: server client |
| 23 | |
| 24 | stubs: ../ThriftTest.thrift |
| 25 | $(THRIFT) ../ThriftTest.thrift |
| 26 | |
| 27 | server: stubs |
| 28 | g++ -o TestServer $(CFL) TestServer.cc gen-cpp/ThriftTest.cc |
| 29 | |
| 30 | client: stubs |
| 31 | g++ -o TestClient $(CFL) TestClient.cc gen-cpp/ThriftTest.cc |
| 32 | |
| 33 | clean: |
| 34 | rm -fr TestServer TestClient gen-cpp |