ceph/src/Makefile-env.am
Rohan Mars 62bfc7a1ab moved to use boost uuid implementation, based on commit 4fe89a7b14
Signed-off-by: Rohan Mars <code@rohanmars.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2015-08-19 06:46:17 -04:00

253 lines
5.7 KiB
Plaintext

AUTOMAKE_OPTIONS = gnu subdir-objects
SUBDIRS =
DIST_SUBDIRS =
BUILT_SOURCES =
EXTRA_DIST =
CLEANFILES =
noinst_HEADERS =
bin_PROGRAMS =
noinst_PROGRAMS =
bin_SCRIPTS =
sbin_PROGRAMS =
sbin_SCRIPTS =
su_sbin_PROGRAMS =
su_sbin_SCRIPTS =
dist_bin_SCRIPTS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
noinst_LIBRARIES =
radoslib_LTLIBRARIES =
# like bin_PROGRAMS, but these targets are only built for debug builds
bin_DEBUGPROGRAMS =
# like sbin_SCRIPTS but can be used to install to e.g. /usr/sbin
ceph_sbindir = $(sbindir)
# certain things go straight into /sbin, though!
su_sbindir = /sbin
# C/C++ tests to build and executed will be appended to this
check_TESTPROGRAMS =
check_PROGRAMS = $(check_TESTPROGRAMS)
# tests scripts will be appended to this
check_SCRIPTS =
# display the output of failed check_SCRIPTS after a failed make check
export VERBOSE = true
# python unit tests need to know where the scripts are located
export PYTHONPATH=$(top_srcdir)/src/pybind
# when doing a debug build, make sure to make the targets
if WITH_DEBUG
bin_PROGRAMS += $(bin_DEBUGPROGRAMS)
endif
##################################
## automake environment
HARDENING_CFLAGS = \
-O2 \
-g \
-pipe \
-Wall \
-Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions \
--param=ssp-buffer-size=4 \
-fPIE
SET_STACK_PROTECTOR_STRONG = $(shell expr `gcc -dumpversion` \>= 4.9)
ifeq ($(SET_STACK_PROTECTOR_STRONG),1)
HARDENING_CFLAGS += -fstack-protector-strong
else
HARDENING_CFLAGS += -fstack-protector
endif
HARDENING_LDFLAGS = \
-pie \
-Wl,-z,relro \
-Wl,-z,now
AM_COMMON_CPPFLAGS = \
-D__CEPH__ \
-D_FILE_OFFSET_BITS=64 \
-D_REENTRANT \
-D_THREAD_SAFE \
-D__STDC_FORMAT_MACROS \
-D_GNU_SOURCE \
-DCEPH_LIBDIR=\"${libdir}\" \
-DCEPH_PKGLIBDIR=\"${pkglibdir}\" \
-DGTEST_HAS_TR1_TUPLE=0
AM_COMMON_CFLAGS = \
-Wall \
${WARN_TYPE_LIMITS} \
${WARN_IGNORED_QUALIFIERS} \
-Winit-self \
-Wpointer-arith \
${WARN_ERROR_FORMAT_SECURITY} \
-fno-strict-aliasing \
-fsigned-char
if !CLANG
AM_COMMON_CFLAGS += -rdynamic
endif
AM_CFLAGS = $(AM_COMMON_CFLAGS) $(HARDENING_CFLAGS)
AM_CPPFLAGS = $(AM_COMMON_CPPFLAGS)
AM_CXXFLAGS = \
@AM_CXXFLAGS@ \
$(AM_COMMON_CFLAGS) \
-ftemplate-depth-1024 \
-Wnon-virtual-dtor \
-Wno-invalid-offsetof $(HARDENING_CFLAGS)
if !CLANG
AM_CXXFLAGS += -Wstrict-null-sentinel
endif
# note: this is position dependant, it affects the -l options that
# come after it on the command line. when you use ${AM_LDFLAGS} in
# later rules, take care where you place it. for more information, see
# http://blog.flameeyes.eu/2008/11/19/relationship-between-as-needed-and-no-undefined-part-1-what-do-they-do
# http://blog.flameeyes.eu/2008/11/20/misguided-link-and-as-needed
# http://www.gentoo.org/proj/en/qa/asneeded.xml
# http://gcc.gnu.org/ml/gcc-help/2010-12/msg00338.html
# http://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/
AM_LDFLAGS =
if LINUX
AM_LDFLAGS += -Wl,--as-needed $(HARDENING_LDFLAGS)
endif
if USE_BOOST_SPIRIT_OLD_HDR
AM_CXXFLAGS += -DUSE_BOOST_SPIRIT_OLD_HDR
endif
if WITH_LIBATOMIC
AM_LDFLAGS += -latomic_ops
endif
if ENABLE_COVERAGE
AM_CFLAGS += -fprofile-arcs -ftest-coverage
AM_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
endif
CCAS = ${srcdir}/yasm-wrapper
AM_CCASFLAGS = -f elf64
#####################
## library definitions and dependencies
EXTRALIBS = -lm
if FREEBSD
EXTRALIBS += -lexecinfo
endif # FREEBSD
if LINUX
EXTRALIBS += -lrt
endif # LINUX
if WITH_PROFILER
EXTRALIBS += -lprofiler
endif # PROFILER
LIBGLOBAL = libglobal.la
LIBCOMMON = libcommon.la
LIBSECRET = libsecret.la
LIBARCH = libarch.la
LIBPERFGLUE = libperfglue.la
LIBAUTH = libauth.la
LIBMSG = libmsg.la
LIBCRUSH = libcrush.la
LIBCOMPRESSOR = libcompressor.la -lsnappy
LIBJSON_SPIRIT = libjson_spirit.la
LIBLOG = liblog.la
LIBOS = libos.la
LIBOS_TYPES = libos_types.la
LIBOSD = libosd.la
LIBOSD_TYPES = libosd_types.la
LIBOSDC = libosdc.la
LIBMON = libmon.la
LIBMON_TYPES = libmon_types.la
LIBMDS = libmds.la
LIBCLIENT = libclient.la
LIBCLIENT_FUSE = libclient_fuse.la
LIBRADOS = librados.la
LIBRADOSSTRIPER = libradosstriper.la
LIBRGW = librgw.la
LIBCIVETWEB = libcivetweb.la
LIBRBD = librbd.la
LIBRBD_TYPES = librbd_types.la
LIBKRBD = libkrbd.la
LIBCEPHFS = libcephfs.la
LIBERASURE_CODE = liberasure_code.la
LIBOSD_TP = tracing/libosd_tp.la
LIBRADOS_TP = tracing/librados_tp.la
LIBRBD_TP = tracing/librbd_tp.la
LIBOS_TP = tracing/libos_tp.la
if WITH_LIBAIO
LIBOS += -laio
endif # WITH_LIBAIO
if WITH_LIBZFS
LIBOS += libos_zfs.a -lzfs
endif # WITH_LIBZFS
if WITH_LIBROCKSDB
LIBOS += libos_rocksdb.la
endif # WITH_LIBROCKSDB
if WITH_TCMALLOC_MINIMAL
LIBPERFGLUE += -ltcmalloc_minimal
endif # WITH_TCMALLOC_MINIMAL
if WITH_TCMALLOC
LIBPERFGLUE += -ltcmalloc
endif # WITH_TCMALLOC
if WITH_JEMALLOC
LIBMON += -ljemalloc
LIBOSD += -ljemalloc
LIBMDS += -ljemalloc
LIBRGW += -ljemalloc
endif # WITH_JEMALLOC
if ENABLE_COVERAGE
EXTRALIBS += -lgcov
endif # ENABLE_COVERAGE
# Libosd always needs osdc and os
LIBOSD += $(LIBOSDC) $(LIBOS)
# These have references to syms like ceph_using_tcmalloc(), glue libperfglue to them
LIBMON += $(LIBPERFGLUE)
LIBOSD += $(LIBPERFGLUE)
LIBMDS += $(LIBPERFGLUE)
# Always use system leveldb
LIBOS += -lleveldb -lsnappy
# Use this for binaries requiring libglobal
CEPH_GLOBAL = $(LIBGLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
# This is set by [lib]/Makefile.am and used for build tests
LIBCOMMON_DEPS =
LIBRADOS_DEPS =
LIBRGW_DEPS =
# This is used by the dencoder test
DENCODER_SOURCES =
DENCODER_DEPS =
radoslibdir = $(libdir)/rados-classes