Subversion Repositories SmartDukaan

Rev

Rev 30 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 ashish 1
#
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
#
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
 
51
all: server client
52
 
53
stubs: ThreadsTest.thrift
54
	$(THRIFT) --gen cpp --gen py ThreadsTest.thrift
55
 
56
server: stubs
57
	g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp
58
 
59
client: stubs
60
	g++ -o ThreadsClient $(CFL) ThreadsClient.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp
61
 
62
clean:
63
	$(RM) -r *.o ThreadsServer ThreadsClient gen-cpp gen-py