blob: 1a753b3a1be44053590f3171e5b3dac4161fab51 [file] [log] [blame]
Mark Sleee02385b2007-06-09 01:21:16 +00001#
David Reissea2cba82009-03-30 21:35:00 +00002# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Marc Slemko3ea00332006-08-17 01:11:13 +000019
20ifndef thrift_home
Aditya Agarwal3950f472006-10-11 02:50:15 +000021thrift_home=../..
Marc Slemko3ea00332006-08-17 01:11:13 +000022endif #thrift_home
23
24target: all
25
Marc Slemko3ea00332006-08-17 01:11:13 +000026ifndef boost_home
Aditya Agarwal3950f472006-10-11 02:50:15 +000027#boost_home=../../../../../thirdparty/boost_1_33_1
28boost_home=/usr/local/include/boost-1_33_1
29endif #boost_home
Marc Slemko3ea00332006-08-17 01:11:13 +000030target: all
31
Aditya Agarwal3950f472006-10-11 02:50:15 +000032include_paths = $(thrift_home)/lib/cpp/src \
Mark Sleee02385b2007-06-09 01:21:16 +000033 $(thrift_home)/lib/cpp \
David Reiss832b2622007-12-28 18:25:33 +000034 $(thrift_home)/ \
Mark Sleee02385b2007-06-09 01:21:16 +000035 $(boost_home)
Marc Slemko3ea00332006-08-17 01:11:13 +000036
37include_flags = $(patsubst %,-I%, $(include_paths))
38
39# Tools
Aditya Agarwal3950f472006-10-11 02:50:15 +000040ifndef THRIFT
Mark Slee739dbe52007-02-01 22:55:30 +000041THRIFT = ../../compiler/cpp/thrift
Aditya Agarwal3950f472006-10-11 02:50:15 +000042endif # THRIFT
43
Marc Slemko3ea00332006-08-17 01:11:13 +000044CC = g++
45LD = g++
46
47# Compiler flags
Mark Sleee02385b2007-06-09 01:21:16 +000048DCFL = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
49CFL = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
Marc Slemko3ea00332006-08-17 01:11:13 +000050
Mark Sleee02385b2007-06-09 01:21:16 +000051all: stress-test stress-test-nb
Marc Slemko3ea00332006-08-17 01:11:13 +000052
Mark Sleee02385b2007-06-09 01:21:16 +000053debug: stress-test-debug stress-test-debug-nb
Marc Slemko3ea00332006-08-17 01:11:13 +000054
Aditya Agarwal3950f472006-10-11 02:50:15 +000055stubs: ../StressTest.thrift
David Reissb139f642009-02-17 20:28:46 +000056 $(THRIFT) --gen cpp --gen php ../StressTest.thrift
Marc Slemko3ea00332006-08-17 01:11:13 +000057
Mark Sleee02385b2007-06-09 01:21:16 +000058stress-test-debug-nb: stubs
59 g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
60
61stress-test-nb: stubs
62 g++ -o stress-test-nb $(CFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
63
Marc Slemko3ea00332006-08-17 01:11:13 +000064stress-test-debug: stubs
Mark Slee9a079272006-10-12 04:05:23 +000065 g++ -o stress-test $(DCFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Marc Slemko3ea00332006-08-17 01:11:13 +000066
67stress-test: stubs
Mark Slee9a079272006-10-12 04:05:23 +000068 g++ -o stress-test $(CFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Marc Slemko3ea00332006-08-17 01:11:13 +000069
70clean:
Mark Sleee02385b2007-06-09 01:21:16 +000071 rm -fr stress-test stress-test-nb gen-cpp