r1389@opsdev009 (orig r72873): mcslee | 2007-12-05 15:13:11 -0800
[amiethrift.git] / test / cpp / Makefile.stress
blob9d79541c584c74e39a6e7e366c63355f6f00ad68
1 # Makefile for Thrift test project.
3 # Author:
4 #   Marc Kwiatkowski <marc@facebook.com>
5 #   Aditya Agarwal   <aditya@facebook.com>
8 ifndef thrift_home
9 thrift_home=../..
10 endif #thrift_home
12 target: all
14 ifndef boost_home
15 #boost_home=../../../../../thirdparty/boost_1_33_1
16 boost_home=/usr/local/include/boost-1_33_1
17 endif #boost_home
18 target: all
20 include_paths = $(thrift_home)/lib/cpp/src \
21                 $(thrift_home)/lib/cpp \
22                 $(boost_home)
24 include_flags = $(patsubst %,-I%, $(include_paths))
26 # Tools
27 ifndef THRIFT
28 THRIFT = ../../compiler/cpp/thrift
29 endif # THRIFT
31 CC     = g++
32 LD     = g++
34 # Compiler flags
35 DCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
36 CFL   = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
38 all: stress-test stress-test-nb
40 debug: stress-test-debug stress-test-debug-nb
42 stubs: ../StressTest.thrift
43         $(THRIFT) --cpp --php ../StressTest.thrift
45 stress-test-debug-nb: stubs
46         g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
48 stress-test-nb: stubs
49         g++ -o stress-test-nb $(CFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
51 stress-test-debug: stubs
52         g++ -o stress-test $(DCFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
54 stress-test: stubs
55         g++ -o stress-test $(CFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
57 clean:
58         rm -fr stress-test stress-test-nb gen-cpp