blob: 748d3298dbcceae64cb6a1e5da7725e09d77d38f [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
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
pwyckoff99b000b2008-04-03 19:30:55 +000020@GLOBAL_HEADER_MK@
21
22@PRODUCT_MK@
23
24
25# User specified path variables set in configure.ac.
26# thrift_home
pwyckoff99b000b2008-04-03 19:30:55 +000027#
28THRIFT = $(thrift_home)/bin/thrift
29
30# User defined conditionals and conditonal statements set up in configure.ac.
31if DEBUG
32 DEBUG_CPPFLAGS = -DDEBUG_TIMING
33endif
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
39AM_CPPFLAGS = -I..
40AM_CPPFLAGS += -Igen-cpp
Jens Geyer79f988c2014-10-03 20:42:54 +020041AM_CPPFLAGS += -I$(thrift_home)/include/thrift
David Reiss7c28b332008-09-20 00:14:01 +000042AM_CPPFLAGS += $(BOOST_CPPFLAGS)
pwyckoff99b000b2008-04-03 19:30:55 +000043AM_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
50fb303_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
53if STATIC
54lib_LIBRARIES = libfb303.a
55libfb303_a_SOURCES = $(fb303_lib)
56INTERNAL_LIBS = libfb303.a
57endif
58
59# Shared -- multiple libraries can be defined
60if SHARED
David Reissb6657f12010-05-17 19:13:23 +000061shareddir = $(prefix)/lib
pwyckoff99b000b2008-04-03 19:30:55 +000062shared_PROGRAMS = libfb303.so
63libfb303_so_SOURCES = $(fb303_lib)
64libfb303_so_CXXFLAGS = $(SHARED_CXXFLAGS)
65libfb303_so_LDFLAGS = $(SHARED_LDFLAGS)
66INTERNAL_LIBS = libfb303.so
67endif
68
69# Set up Thrift specific activity here.
70# We assume that a <name>+types.cpp will always be built from <name>.thrift.
David Reissca67b892010-09-28 03:30:17 +000071$(eval $(call thrift_template,.,../if/fb303.thrift,-I $(thrift_home)/share --gen cpp:pure_enums ))
pwyckoff99b000b2008-04-03 19:30:55 +000072
73include_fb303dir = $(includedir)/thrift/fb303
74include_fb303_HEADERS = FacebookBase.h ServiceTracker.h gen-cpp/FacebookService.h gen-cpp/fb303_constants.h gen-cpp/fb303_types.h
75
David Reiss576dfdc2009-02-07 02:37:00 +000076include_fb303ifdir = $(prefix)/share/fb303/if
pwyckoff99b000b2008-04-03 19:30:55 +000077include_fb303if_HEADERS = ../if/fb303.thrift
78
79BUILT_SOURCES = thriftstyle
80
81# Add to pre-existing target clean
82clean-local: clean-common
83
84@GLOBAL_FOOTER_MK@