blob: 907cfc85edb2fad6d19cc2d81bf2ecbb0073ae06 [file] [log] [blame]
pwyckoff99b000b2008-04-03 19:30:55 +00001@GLOBAL_HEADER_MK@
2
3@PRODUCT_MK@
4
5
6# User specified path variables set in configure.ac.
7# thrift_home
8# boost_home
9#
10THRIFT = $(thrift_home)/bin/thrift
11
12# User defined conditionals and conditonal statements set up in configure.ac.
13if DEBUG
14 DEBUG_CPPFLAGS = -DDEBUG_TIMING
15endif
16
17# Set common flags recognized by automake.
18# DO NOT USE CPPFLAGS, CXXFLAGS, CFLAGS, LDFLAGS here! Set in configure.ac and|or override on command line.
19# USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section.
20
21AM_CPPFLAGS = -I..
22AM_CPPFLAGS += -Igen-cpp
23AM_CPPFLAGS += -I$(thrift_home)/include/thrift -I$(boost_home)/include/boost-1_33_1
24AM_CPPFLAGS += $(FB_CPPFLAGS) $(DEBUG_CPPFLAGS)
25
26# GENERATE BUILD RULES
27# Set Program/library specific flags recognized by automake.
28# Use <progname|libname>_<FLAG> to set prog / lib specific flag s
29# foo_CXXFLAGS foo_CPPFLAGS foo_LDFLAGS foo_LDADD
30
31fb303_lib = gen-cpp/FacebookService.cpp gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp FacebookBase.cpp ServiceTracker.cpp
32
33# Static -- multiple libraries can be defined
34if STATIC
35lib_LIBRARIES = libfb303.a
36libfb303_a_SOURCES = $(fb303_lib)
37INTERNAL_LIBS = libfb303.a
38endif
39
40# Shared -- multiple libraries can be defined
41if SHARED
42shareddir = lib
43shared_PROGRAMS = libfb303.so
44libfb303_so_SOURCES = $(fb303_lib)
45libfb303_so_CXXFLAGS = $(SHARED_CXXFLAGS)
46libfb303_so_LDFLAGS = $(SHARED_LDFLAGS)
47INTERNAL_LIBS = libfb303.so
48endif
49
50# Set up Thrift specific activity here.
51# We assume that a <name>+types.cpp will always be built from <name>.thrift.
52$(eval $(call thrift_template,.,../if/fb303.thrift,-I $(thrift_home)/share --gen cpp ))
53
54include_fb303dir = $(includedir)/thrift/fb303
55include_fb303_HEADERS = FacebookBase.h ServiceTracker.h gen-cpp/FacebookService.h gen-cpp/fb303_constants.h gen-cpp/fb303_types.h
56
57include_fb303ifdir = $(thrift_home)/share/fb303/if
58include_fb303if_HEADERS = ../if/fb303.thrift
59
60BUILT_SOURCES = thriftstyle
61
62# Add to pre-existing target clean
63clean-local: clean-common
64
65@GLOBAL_FOOTER_MK@