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