thrift/test/cpp/Makefile.stress
David Reiss 832b262aca Thrift: Revamp build to use a single configure.ac.
Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665409 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 18:25:33 +00:00

60 lines
1.5 KiB
Makefile

# Makefile for Thrift test project.
#
# Author:
# Marc Kwiatkowski <marc@facebook.com>
# Aditya Agarwal <aditya@facebook.com>
ifndef thrift_home
thrift_home=../..
endif #thrift_home
target: all
ifndef boost_home
#boost_home=../../../../../thirdparty/boost_1_33_1
boost_home=/usr/local/include/boost-1_33_1
endif #boost_home
target: all
include_paths = $(thrift_home)/lib/cpp/src \
$(thrift_home)/lib/cpp \
$(thrift_home)/ \
$(boost_home)
include_flags = $(patsubst %,-I%, $(include_paths))
# Tools
ifndef THRIFT
THRIFT = ../../compiler/cpp/thrift
endif # THRIFT
CC = g++
LD = g++
# Compiler flags
DCFL = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
CFL = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
all: stress-test stress-test-nb
debug: stress-test-debug stress-test-debug-nb
stubs: ../StressTest.thrift
$(THRIFT) --cpp --php ../StressTest.thrift
stress-test-debug-nb: stubs
g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
stress-test-nb: stubs
g++ -o stress-test-nb $(CFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
stress-test-debug: stubs
g++ -o stress-test $(DCFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
stress-test: stubs
g++ -o stress-test $(CFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
clean:
rm -fr stress-test stress-test-nb gen-cpp