blob: 2190cc3164a6bd8860f9ac659018ff5883dac367 [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
Mark Slee632f3232006-08-30 17:23:52 +000041 $(THRIFT) --cpp --php ../StressTest.thrift
Marc Slemko3ea00332006-08-17 01:11:13 +000042
43stress-test-debug: stubs
Mark Slee632f3232006-08-30 17:23:52 +000044 g++ -o stress-test $(DCFL) src/main.cc cpp-gen/StressTest.cc
Marc Slemko3ea00332006-08-17 01:11:13 +000045
46stress-test: stubs
Mark Slee632f3232006-08-30 17:23:52 +000047 g++ -o stress-test $(CFL) src/main.cc cpp-gen/StressTest.cc
Marc Slemko3ea00332006-08-17 01:11:13 +000048
49clean:
50 rm -fr stress-test cpp-gen