| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 1 | # | 
| David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 2 | # 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 Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 19 |  | 
|  | 20 | ifndef thrift_home | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 21 | thrift_home=../.. | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 22 | endif #thrift_home | 
|  | 23 |  | 
|  | 24 | target: all | 
|  | 25 |  | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 26 | ifndef boost_home | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 27 | #boost_home=../../../../../thirdparty/boost_1_33_1 | 
|  | 28 | boost_home=/usr/local/include/boost-1_33_1 | 
|  | 29 | endif #boost_home | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 30 | target: all | 
|  | 31 |  | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 32 | include_paths = $(thrift_home)/lib/cpp/src \ | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 33 | $(thrift_home)/lib/cpp \ | 
| David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 34 | $(thrift_home)/ \ | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 35 | $(boost_home) | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 36 |  | 
|  | 37 | include_flags = $(patsubst %,-I%, $(include_paths)) | 
|  | 38 |  | 
|  | 39 | # Tools | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 40 | ifndef THRIFT | 
| Mark Slee | 739dbe5 | 2007-02-01 22:55:30 +0000 | [diff] [blame] | 41 | THRIFT = ../../compiler/cpp/thrift | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 42 | endif # THRIFT | 
|  | 43 |  | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 44 | CC     = g++ | 
|  | 45 | LD     = g++ | 
|  | 46 |  | 
|  | 47 | # Compiler flags | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 48 | DCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent | 
|  | 49 | CFL   = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 50 |  | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 51 | all: stress-test stress-test-nb | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 52 |  | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 53 | debug: stress-test-debug stress-test-debug-nb | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 54 |  | 
| Aditya Agarwal | 3950f47 | 2006-10-11 02:50:15 +0000 | [diff] [blame] | 55 | stubs: ../StressTest.thrift | 
| David Reiss | b139f64 | 2009-02-17 20:28:46 +0000 | [diff] [blame] | 56 | $(THRIFT) --gen cpp --gen php ../StressTest.thrift | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 57 |  | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 58 | stress-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 |  | 
|  | 61 | stress-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 Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 64 | stress-test-debug: stubs | 
| Mark Slee | 9a07927 | 2006-10-12 04:05:23 +0000 | [diff] [blame] | 65 | g++ -o stress-test $(DCFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 66 |  | 
|  | 67 | stress-test: stubs | 
| Mark Slee | 9a07927 | 2006-10-12 04:05:23 +0000 | [diff] [blame] | 68 | g++ -o stress-test $(CFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp | 
| Marc Slemko | 3ea0033 | 2006-08-17 01:11:13 +0000 | [diff] [blame] | 69 |  | 
|  | 70 | clean: | 
| Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 71 | rm -fr stress-test stress-test-nb gen-cpp |