-
The CFLAGS, CXXFLAGS, LDFLAGS and other variables intended to be overridden by the user should not directly be set by the package. This change uses one of the approaches recommended by the Autoconf and Automake manuals, which is to use custom variables to accumulate flags in the configure script and add them to the make targets they apply to. This has the benefit of not cluttering the flags used during the Autoconf tests, which has proved problematic (see the previous commit for a demonstration). * configure.ac: Replace CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS by DAEMONCFLAGS, DAEMONCXXFLAGS, DAEMONCPPFLAGS and DAEMONLDFLAGS, respectively. Use these custom variables as the default values of AM_CFLAGS, AM_CXXFLAGS, AM_CPPFLAGS and AM_LDFLAGS, respectively. Remove an extraneous check on jsoncpp. * bin/Makefile.am (ringcli_CXXFLAGS): Honor the the AM_CXXFLAGS variable. globals.mk: Extend rather than override the AM_CPPFLAGS variable. * src/Makefile.am (libring_la_LDFLAGS): Honor AM_LDFLAGS. (libring_la_CFLAGS): Honor AM_CFLAGS. (libring_la_CXXFLAGS): Honor AM_CXXFLAGS. * src/client/Makefile.am (libclient_la_CXXFLAGS): Honor AM_CXXFLAGS. * src/im/Makefile.am (libim_la_CXXFLAGS): Remove variable. * src/jamidht/Makefile.am (libringacc_la_CXXFLAGS): Likewise. * src/media/audio/Makefile.am (libaudio_la_CXXFLAGS): Honor AM_CXXFLAGS. (libaudio_la_LDFLAGS): Honor the AM_CXXFLAGS variable. * src/media/audio/coreaudio/Makefile.am (libcoreaudiolayer_la_CXXFLAGS): Likewise. * src/media/video/Makefile.am (libvideo_la_CFLAGS): Honor the AM_CFLAGS variable. (libvideo_la_CXXFLAGS): Honor the AM_CXXFLAGS variable. * src/media/video/v4l2/Makefile.am (AM_CXXFLAGS): Extend rather than override. * src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Honor the AM_CXXFLAGS variable. * src/security/Makefile.am (libsecurity_la_CXXFLAGS): Likewise. * src/sip/Makefile.am (libsiplink_la_CXXFLAGS): Likewise. * src/upnp/Makefile.am (libupnpcontrol_la_CXXFLAGS): Remove variable. * src/upnp/protocol/Makefile.am (libupnpprotocol_la_CXXFLAGS): Likewise. * src/upnp/protocol/natpmp/Makefile.am (libnat_pmp_la_CXXFLAGS): Likewise. * src/upnp/protocol/pupnp/Makefile.am (libpupnp_la_CXXFLAGS): Likewise. * test/sip/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Extend rather than override. * test/unitTest/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Likewise. GitLab: #487 Change-Id: I18be9d812159f8156efb9f7849e7eac6d4c6b3ca squash! configure.ac: Do not set user variables. Change-Id: I1146ea15d6fb75fe53d3cbdd782e981c933e82a6
The CFLAGS, CXXFLAGS, LDFLAGS and other variables intended to be overridden by the user should not directly be set by the package. This change uses one of the approaches recommended by the Autoconf and Automake manuals, which is to use custom variables to accumulate flags in the configure script and add them to the make targets they apply to. This has the benefit of not cluttering the flags used during the Autoconf tests, which has proved problematic (see the previous commit for a demonstration). * configure.ac: Replace CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS by DAEMONCFLAGS, DAEMONCXXFLAGS, DAEMONCPPFLAGS and DAEMONLDFLAGS, respectively. Use these custom variables as the default values of AM_CFLAGS, AM_CXXFLAGS, AM_CPPFLAGS and AM_LDFLAGS, respectively. Remove an extraneous check on jsoncpp. * bin/Makefile.am (ringcli_CXXFLAGS): Honor the the AM_CXXFLAGS variable. globals.mk: Extend rather than override the AM_CPPFLAGS variable. * src/Makefile.am (libring_la_LDFLAGS): Honor AM_LDFLAGS. (libring_la_CFLAGS): Honor AM_CFLAGS. (libring_la_CXXFLAGS): Honor AM_CXXFLAGS. * src/client/Makefile.am (libclient_la_CXXFLAGS): Honor AM_CXXFLAGS. * src/im/Makefile.am (libim_la_CXXFLAGS): Remove variable. * src/jamidht/Makefile.am (libringacc_la_CXXFLAGS): Likewise. * src/media/audio/Makefile.am (libaudio_la_CXXFLAGS): Honor AM_CXXFLAGS. (libaudio_la_LDFLAGS): Honor the AM_CXXFLAGS variable. * src/media/audio/coreaudio/Makefile.am (libcoreaudiolayer_la_CXXFLAGS): Likewise. * src/media/video/Makefile.am (libvideo_la_CFLAGS): Honor the AM_CFLAGS variable. (libvideo_la_CXXFLAGS): Honor the AM_CXXFLAGS variable. * src/media/video/v4l2/Makefile.am (AM_CXXFLAGS): Extend rather than override. * src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Honor the AM_CXXFLAGS variable. * src/security/Makefile.am (libsecurity_la_CXXFLAGS): Likewise. * src/sip/Makefile.am (libsiplink_la_CXXFLAGS): Likewise. * src/upnp/Makefile.am (libupnpcontrol_la_CXXFLAGS): Remove variable. * src/upnp/protocol/Makefile.am (libupnpprotocol_la_CXXFLAGS): Likewise. * src/upnp/protocol/natpmp/Makefile.am (libnat_pmp_la_CXXFLAGS): Likewise. * src/upnp/protocol/pupnp/Makefile.am (libpupnp_la_CXXFLAGS): Likewise. * test/sip/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Extend rather than override. * test/unitTest/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Likewise. GitLab: #487 Change-Id: I18be9d812159f8156efb9f7849e7eac6d4c6b3ca squash! configure.ac: Do not set user variables. Change-Id: I1146ea15d6fb75fe53d3cbdd782e981c933e82a6
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile.am 576 B
include $(top_srcdir)/globals.mk
noinst_LTLIBRARIES = libclient.la
noinst_HEADERS = \
ring_signal.h
PRESENCE_SRC = presencemanager.cpp
if ENABLE_VIDEO
VIDEO_SRC = videomanager.cpp
noinst_HEADERS += videomanager.h
endif
if ENABLE_PLUGIN
PLUGIN_SRC = plugin_manager_interface.cpp
endif
libclient_la_SOURCES = \
ring_signal.cpp \
callmanager.cpp \
configurationmanager.cpp \
datatransfer.cpp \
$(PLUGIN_SRC) \
$(PRESENCE_SRC) \
$(VIDEO_SRC)
libclient_la_CXXFLAGS = \
-I./ \
-I../ \
-DPREFIX=\"$(prefix)\" \
-DPROGSHAREDIR=\"${datadir}/ring\" \
$(AM_CXXFLAGS)