Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/deps.Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Define build flags for used dependencies.

$(top_srcdir)/config.mk:
$(top_srcdir)/utils/gen-common-flags >$@
$(top_srcdir)/config.mk: $(top_srcdir)/utils/gen-common-flags \
$(top_srcdir)/utils/gen-bcg729-flags \
$(top_srcdir)/utils/gen-codec-chain-flags
$(top_srcdir)/utils/gen-common-flags >$@.new
ifeq (,$(filter pkg.ngcp-rtpengine.nobcg729,${DEB_BUILD_PROFILES}))
$(top_srcdir)/utils/gen-bcg729-flags >>$@
$(top_srcdir)/utils/gen-bcg729-flags >>$@.new
endif
ifneq (,$(filter pkg.ngcp-rtpengine.codec-chain,${DEB_BUILD_PROFILES}))
$(top_srcdir)/utils/gen-codec-chain-flags >>$@
$(top_srcdir)/utils/gen-codec-chain-flags >>$@.new
endif
mv $@.new $@

include $(top_srcdir)/config.mk
5 changes: 5 additions & 0 deletions utils/gen-common-flags
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ gen-pkgconf-flags()
local var="$1"
local pc="$2"

if ! pkg-config --exists "${pc}"; then
echo "Error: Required package '${pc}' not found" >&2
exit 1
fi

echo "export CFLAGS_${var} LDLIBS_${var}"
echo "CFLAGS_${var} := $(pkg-config --cflags "${pc}")"
echo "LDLIBS_${var} := $(pkg-config --libs "${pc}")"
Expand Down