blob: 36abb43411c8af66c339e25d1102079e92159746 [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001# Makefile for Thrift test project.
2#
3# Author:
4# Mark Slee <mcslee@facebook.com>
5
6# Default target is everything
7target: all
8
9# Tools
Mark Slee95771002006-06-07 06:53:25 +000010THRIFT = thrift
Mark Sleee8540632006-05-30 09:24:40 +000011CC = g++
12LD = g++
13
14# Compiler flags
Mark Slee6e536442006-06-30 18:28:50 +000015LIBS = ../../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
21DCFL = -Wall -O3 -g -Igen-cpp -I../../lib/cpp/src $(LIBS)
22CFL = -Wall -O3 -Igen-cpp -I../../lib/cpp/src -lthrift
Mark Sleee8540632006-05-30 09:24:40 +000023
24all: server client
25
Mark Slee6e536442006-06-30 18:28:50 +000026debug: server-debug client-debug
27
Mark Sleee8540632006-05-30 09:24:40 +000028stubs: ../ThriftTest.thrift
Mark Slee95771002006-06-07 06:53:25 +000029 $(THRIFT) -cpp ../ThriftTest.thrift
Mark Sleee8540632006-05-30 09:24:40 +000030
Mark Slee6e536442006-06-30 18:28:50 +000031server-debug: stubs
32 g++ -o TestServer $(DCFL) src/TestServer.cc gen-cpp/ThriftTest.cc
33
34client-debug: stubs
35 g++ -o TestClient $(DCFL) src/TestClient.cc gen-cpp/ThriftTest.cc
36
Mark Sleee8540632006-05-30 09:24:40 +000037server: stubs
Mark Slee95771002006-06-07 06:53:25 +000038 g++ -o TestServer $(CFL) src/TestServer.cc gen-cpp/ThriftTest.cc
Mark Sleee8540632006-05-30 09:24:40 +000039
40client: stubs
Mark Slee95771002006-06-07 06:53:25 +000041 g++ -o TestClient $(CFL) src/TestClient.cc gen-cpp/ThriftTest.cc
Mark Sleee8540632006-05-30 09:24:40 +000042
43clean:
44 rm -fr TestServer TestClient gen-cpp