blob: 79c0134c4b27ffcb3ba383f462f9bc3cab38913d [file] [log] [blame]
Mark Sleeb32f3c62007-03-05 04:48:48 +00001# Makefile for Thrift test project.
2#
3# Author:
4# Mark Slee <mcslee@facebook.com>
5
6# Default target is everything
7
8ifndef thrift_home
9thrift_home=../../
10endif #thrift_home
11
12target: all
13
14ifndef boost_home
15boost_home=/usr/local/include/boost-1_33_1
16endif #boost_home
17target: all
18
19include_paths = $(thrift_home)/lib/cpp/src \
20 $(boost_home)
21
22include_flags = $(patsubst %,-I%, $(include_paths))
23
24# Tools
25ifndef THRIFT
26THRIFT = ../../compiler/cpp/thrift
27endif # THRIFT
28
29CC = g++
30LD = g++
31
32# Compiler flags
33LFL = -L$(thrift_home)/lib/cpp/.libs -lthrift
34CCFL = -Wall -O3 -g -I./gen-cpp $(include_flags)
35CFL = $(CCFL) $(LFL)
36
37all: server
38
39stubs: ThreadsTest.thrift
40 $(THRIFT) -cpp -py ThreadsTest.thrift
41
42server: stubs
43 g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp
44
45clean:
46 rm -fr *.o ThreadsServer gen-cpp