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 |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 10 | THRIFT = thrift |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 11 | CC = g++ |
| 12 | LD = g++ |
| 13 | |
| 14 | # Compiler flags |
Mark Slee | 6e53644 | 2006-06-30 18:28:50 +0000 | [diff] [blame^] | 15 | LIBS = ../../lib/cpp/src/server/TSimpleServer.cc \ |
| 16 | ../../lib/cpp/src/protocol/TBinaryProtocol.cc \ |
| 17 | ../../lib/cpp/src/transport/TBufferedTransport.cc \ |
| 18 | ../../lib/cpp/src/transport/TChunkedTransport.cc \ |
| 19 | ../../lib/cpp/src/transport/TServerSocket.cc \ |
| 20 | ../../lib/cpp/src/transport/TSocket.cc |
| 21 | DCFL = -Wall -O3 -g -Igen-cpp -I../../lib/cpp/src $(LIBS) |
| 22 | CFL = -Wall -O3 -Igen-cpp -I../../lib/cpp/src -lthrift |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 23 | |
| 24 | all: server client |
| 25 | |
Mark Slee | 6e53644 | 2006-06-30 18:28:50 +0000 | [diff] [blame^] | 26 | debug: server-debug client-debug |
| 27 | |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 28 | stubs: ../ThriftTest.thrift |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 29 | $(THRIFT) -cpp ../ThriftTest.thrift |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 30 | |
Mark Slee | 6e53644 | 2006-06-30 18:28:50 +0000 | [diff] [blame^] | 31 | server-debug: stubs |
| 32 | g++ -o TestServer $(DCFL) src/TestServer.cc gen-cpp/ThriftTest.cc |
| 33 | |
| 34 | client-debug: stubs |
| 35 | g++ -o TestClient $(DCFL) src/TestClient.cc gen-cpp/ThriftTest.cc |
| 36 | |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 37 | server: stubs |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 38 | g++ -o TestServer $(CFL) src/TestServer.cc gen-cpp/ThriftTest.cc |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 39 | |
| 40 | client: stubs |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 41 | g++ -o TestClient $(CFL) src/TestClient.cc gen-cpp/ThriftTest.cc |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 42 | |
| 43 | clean: |
| 44 | rm -fr TestServer TestClient gen-cpp |