| David Reiss | 0c90f6f | 2008-02-06 22:18:40 +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 | # | 
| Mark Slee | b32f3c6 | 2007-03-05 04:48:48 +0000 | [diff] [blame] | 19 |  | 
 | 20 | # Default target is everything | 
 | 21 |  | 
 | 22 | ifndef thrift_home | 
 | 23 | thrift_home=../../ | 
 | 24 | endif #thrift_home | 
 | 25 |  | 
 | 26 | target: all | 
 | 27 |  | 
 | 28 | ifndef boost_home | 
 | 29 | boost_home=/usr/local/include/boost-1_33_1 | 
 | 30 | endif #boost_home | 
 | 31 | target: all | 
 | 32 |  | 
 | 33 | include_paths = $(thrift_home)/lib/cpp/src \ | 
 | 34 | 		$(boost_home) | 
 | 35 |  | 
 | 36 | include_flags = $(patsubst %,-I%, $(include_paths)) | 
 | 37 |  | 
 | 38 | # Tools | 
 | 39 | ifndef THRIFT | 
 | 40 | THRIFT = ../../compiler/cpp/thrift | 
 | 41 | endif # THRIFT | 
 | 42 |  | 
 | 43 | CC     = g++ | 
 | 44 | LD     = g++ | 
 | 45 |  | 
 | 46 | # Compiler flags | 
 | 47 | LFL   =  -L$(thrift_home)/lib/cpp/.libs -lthrift | 
 | 48 | CCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) | 
 | 49 | CFL   = $(CCFL) $(LFL) | 
 | 50 |  | 
| Mark Slee | c416a27 | 2007-03-05 05:40:37 +0000 | [diff] [blame] | 51 | all: server client | 
| Mark Slee | b32f3c6 | 2007-03-05 04:48:48 +0000 | [diff] [blame] | 52 |  | 
 | 53 | stubs: ThreadsTest.thrift | 
| David Reiss | 0c87ad4 | 2008-12-02 02:11:13 +0000 | [diff] [blame] | 54 | 	$(THRIFT) --gen cpp --gen py ThreadsTest.thrift | 
| Mark Slee | b32f3c6 | 2007-03-05 04:48:48 +0000 | [diff] [blame] | 55 |  | 
 | 56 | server: stubs | 
 | 57 | 	g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp | 
 | 58 |  | 
| Mark Slee | c416a27 | 2007-03-05 05:40:37 +0000 | [diff] [blame] | 59 | client: stubs | 
 | 60 | 	g++ -o ThreadsClient $(CFL) ThreadsClient.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp | 
 | 61 |  | 
| Mark Slee | b32f3c6 | 2007-03-05 04:48:48 +0000 | [diff] [blame] | 62 | clean: | 
| David Reiss | 2ca456a | 2008-02-24 16:42:18 +0000 | [diff] [blame] | 63 | 	$(RM) -r *.o ThreadsServer ThreadsClient gen-cpp gen-py |