2009-04-21 17:56:33 -04:00
|
|
|
# Global variables
|
2010-07-30 19:21:49 -04:00
|
|
|
|
2011-09-22 16:31:32 -04:00
|
|
|
src=$(abs_top_srcdir)
|
2009-04-21 17:56:33 -04:00
|
|
|
|
2022-11-01 16:14:39 -04:00
|
|
|
JAMI_DIRTY_REPO ?= $(shell git diff-index --quiet HEAD 2>/dev/null || echo dirty)
|
|
|
|
JAMI_REVISION ?= $(shell git log -1 --format="%h" --abbrev=10 2>/dev/null)
|
2022-01-19 12:12:12 -05:00
|
|
|
JAMI_DATADIR ?= $(datadir)/jami
|
2015-09-01 14:21:58 -04:00
|
|
|
|
2009-04-21 17:56:33 -04:00
|
|
|
# Preprocessor flags
|
configure.ac: Do not set user variables.
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
2021-03-25 23:17:17 -04:00
|
|
|
AM_CPPFLAGS += \
|
2009-04-21 17:56:33 -04:00
|
|
|
-I$(src)/src \
|
2009-05-29 14:19:01 -04:00
|
|
|
-I$(src)/src/config \
|
2015-01-14 12:31:11 -05:00
|
|
|
-I$(src)/src/media \
|
2009-04-21 17:56:33 -04:00
|
|
|
-I$(src)/test \
|
daemon: Rename dring occurrences in code and file names to jamid.
Automated using the following commands:
$ mv src/{dring,jami}
$ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
$ git grep -l '#include "dring/' | \
xargs sed -i 's,#include "dring/,#include "jami/,g'
$ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'
And finally,
$ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'
$ files=$(find -name '*dring*' | sort)
$ for f in $files; do mkdir -p "$(dirname "$f")"; \
mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done
To resolve a bad renaming favorably:
$ git grep -l -i AlsaCarjami | \
xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'
The above renaming command is not perfect, so some hand-tuning was
required to complete it.
* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.
change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
2021-06-15 11:03:11 -04:00
|
|
|
-I$(src)/src/jami \
|
2011-06-20 11:37:59 -04:00
|
|
|
$(SIP_CFLAGS) \
|
2009-04-21 17:56:33 -04:00
|
|
|
-DPREFIX=\"$(prefix)\" \
|
2022-01-19 12:12:12 -05:00
|
|
|
-DJAMI_DATADIR=\"$(JAMI_DATADIR)\" \
|
2009-04-21 17:56:33 -04:00
|
|
|
-DENABLE_TRACE \
|
2022-11-01 16:14:39 -04:00
|
|
|
-DJAMI_REVISION=\"$(JAMI_REVISION)\" \
|
|
|
|
-DJAMI_DIRTY_REPO=\"$(JAMI_DIRTY_REPO)\" \
|
2017-02-08 18:02:15 -05:00
|
|
|
-DPJSIP_MAX_PKT_LEN=8000 \
|
2018-08-01 14:47:49 -04:00
|
|
|
-DPJ_AUTOCONF=1
|