blob: 73206cd7519a0302fe730c022e7e16e85e4339e2 [file] [log] [blame]
Marc Slemko3ea00332006-08-17 01:11:13 +00001# Makefile for Thrift test project.
2#
3# Author:
4# Marc Kwiatkowski <marc@facebook.com>
5
6
7ifndef thrift_home
8thrift_home=../../../../build
9endif #thrift_home
10
11target: all
12
13ifndef thirdparty
14thirdparty = ../../../../../../../thirdparty
15endif #thirdparty
16
17ifndef boost_home
18boost_home = /usr/local/include/boost-1_33_1
19endif #thrift_home
20target: all
21
22include_paths = $(thrift_home)/include/thrift \
23 $(boost_home)
24
25include_flags = $(patsubst %,-I%, $(include_paths))
26
27# Tools
28THRIFT = thrift
29CC = g++
30LD = g++
31
32# Compiler flags
33DCFL = -Wall -O3 -g -I cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
34CFL = -Wall -O3 -I cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
35
36all: stress-test
37
38debug: stress-test-debug
39
40stubs: StressTest.thrift
41 $(THRIFT) --cpp StressTest.thrift
42
43stress-test-debug: stubs
44 g++ -o stress-test $(DCFL) main.cc cpp-gen/StressTest.cc
45
46stress-test: stubs
47 g++ -o stress-test $(CFL) main.cc cpp-gen/StressTest.cc
48
49clean:
50 rm -fr stress-test cpp-gen