| 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 |
@GLOBAL_HEADER_MK@
|
|
|
21 |
|
|
|
22 |
@PRODUCT_MK@
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
# User specified path variables set in configure.ac.
|
|
|
26 |
# thrift_home
|
|
|
27 |
#
|
|
|
28 |
THRIFT = $(thrift_home)/bin/thrift
|
|
|
29 |
|
|
|
30 |
# User defined conditionals and conditonal statements set up in configure.ac.
|
|
|
31 |
if DEBUG
|
|
|
32 |
DEBUG_CPPFLAGS = -DDEBUG_TIMING
|
|
|
33 |
endif
|
|
|
34 |
|
|
|
35 |
# Set common flags recognized by automake.
|
|
|
36 |
# DO NOT USE CPPFLAGS, CXXFLAGS, CFLAGS, LDFLAGS here! Set in configure.ac and|or override on command line.
|
|
|
37 |
# USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section.
|
|
|
38 |
|
|
|
39 |
AM_CPPFLAGS = -I..
|
|
|
40 |
AM_CPPFLAGS += -Igen-cpp
|
|
|
41 |
AM_CPPFLAGS += -I$(thrift_home)/include/thrift
|
|
|
42 |
AM_CPPFLAGS += $(BOOST_CPPFLAGS)
|
|
|
43 |
AM_CPPFLAGS += $(FB_CPPFLAGS) $(DEBUG_CPPFLAGS)
|
|
|
44 |
|
|
|
45 |
# GENERATE BUILD RULES
|
|
|
46 |
# Set Program/library specific flags recognized by automake.
|
|
|
47 |
# Use <progname|libname>_<FLAG> to set prog / lib specific flag s
|
|
|
48 |
# foo_CXXFLAGS foo_CPPFLAGS foo_LDFLAGS foo_LDADD
|
|
|
49 |
|
|
|
50 |
fb303_lib = gen-cpp/FacebookService.cpp gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp FacebookBase.cpp ServiceTracker.cpp
|
|
|
51 |
|
|
|
52 |
# Static -- multiple libraries can be defined
|
|
|
53 |
if STATIC
|
|
|
54 |
lib_LIBRARIES = libfb303.a
|
|
|
55 |
libfb303_a_SOURCES = $(fb303_lib)
|
|
|
56 |
INTERNAL_LIBS = libfb303.a
|
|
|
57 |
endif
|
|
|
58 |
|
|
|
59 |
# Shared -- multiple libraries can be defined
|
|
|
60 |
if SHARED
|
|
|
61 |
shareddir = lib
|
|
|
62 |
shared_PROGRAMS = libfb303.so
|
|
|
63 |
libfb303_so_SOURCES = $(fb303_lib)
|
|
|
64 |
libfb303_so_CXXFLAGS = $(SHARED_CXXFLAGS)
|
|
|
65 |
libfb303_so_LDFLAGS = $(SHARED_LDFLAGS)
|
|
|
66 |
INTERNAL_LIBS = libfb303.so
|
|
|
67 |
endif
|
|
|
68 |
|
|
|
69 |
# Set up Thrift specific activity here.
|
|
|
70 |
# We assume that a <name>+types.cpp will always be built from <name>.thrift.
|
|
|
71 |
$(eval $(call thrift_template,.,../if/fb303.thrift,-I $(thrift_home)/share --gen cpp ))
|
|
|
72 |
|
|
|
73 |
include_fb303dir = $(includedir)/thrift/fb303
|
|
|
74 |
include_fb303_HEADERS = FacebookBase.h ServiceTracker.h gen-cpp/FacebookService.h gen-cpp/fb303_constants.h gen-cpp/fb303_types.h
|
|
|
75 |
|
|
|
76 |
include_fb303ifdir = $(prefix)/share/fb303/if
|
|
|
77 |
include_fb303if_HEADERS = ../if/fb303.thrift
|
|
|
78 |
|
|
|
79 |
BUILT_SOURCES = thriftstyle
|
|
|
80 |
|
|
|
81 |
# Add to pre-existing target clean
|
|
|
82 |
clean-local: clean-common
|
|
|
83 |
|
|
|
84 |
@GLOBAL_FOOTER_MK@
|