summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-04-15 10:37:59 +0000
committerBenny Prijono <bennylp@teluu.com>2013-04-15 10:37:59 +0000
commita7c6c42af5c8480282735800897d29109147b833 (patch)
treee5b771e62475796b7dfbd997f8d414650b909e0a
parent5222a5bef69a2034830f9ed223abae1635a24ad5 (diff)
Re #1657: BB Integration:
- The configure-bb10 now outputs pjsip.pri to be included by application's .pro file in order to get PJSIP's settings included in the app's project - The configure-bb10 now also sets PJ_CONFIG_BB10 macro for platform detection by lib/app git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4468 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--bb10-config.mak43
-rwxr-xr-xconfigure-bb1013
2 files changed, 55 insertions, 1 deletions
diff --git a/bb10-config.mak b/bb10-config.mak
new file mode 100644
index 00000000..322f696d
--- /dev/null
+++ b/bb10-config.mak
@@ -0,0 +1,43 @@
+#
+# This is a utility make file that is used to generate BB10 config settings
+# from current build settings. The stdout output of this make file can be
+# saved to a .pri file which then can be included in app's .pro file.
+#
+# This make file is invoked by configure-bb10 script to generate pjsip.pri
+# file.
+#
+include build.mak
+
+# Generate library list (the "-lxxx" options) from list of linked libraries.
+PJ_BB_LIBS = $(subst PJLIB,pjlib,$(subst .a,,$(subst lib,-l,$(subst pjlib,PJLIB,$(notdir $(APP_LIB_FILES))))))
+
+# This used to generate the library path list (the "-Lxxx" options)
+PJ_BB_LDFLAGS = $(subst $(PJDIR),\$$\$$PJ_DIR,$(APP_LDFLAGS))
+
+all:
+ @echo PJ_DIR = $(PJDIR)
+ @echo
+ @echo 'DEFINES += PJ_AUTOCONF'
+ @echo
+ @echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjlib/include)'
+ @echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjmedia/include)'
+ @echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjnath/include)'
+ @echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjlib-util/include)'
+ @echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjsip/include)'
+ @echo
+ @for token in $(PJ_BB_LDFLAGS); do \
+ if echo $$token | grep -- '-L\$$' >> /dev/null; then \
+ echo "PJ_LIBPATH += \$$\$$quote($$token)"; \
+ fi; \
+ done
+ @echo
+ @for token in $(PJ_BB_LIBS); do \
+ echo PJ_LIBS += $$token; \
+ done
+ @echo
+ @echo 'INCLUDEPATH += $$$$PJ_INCLUDEPATH'
+ @echo 'LIBS += $$$$PJ_LIBPATH'
+ @echo 'LIBS += $$$$PJ_LIBS'
+ @echo 'LIBS += -lOpenAL -lalut -laudio_manager -lsocket -lasound -lbbsystem'
+
+
diff --git a/configure-bb10 b/configure-bb10
index e29f52f4..70da2de4 100755
--- a/configure-bb10
+++ b/configure-bb10
@@ -33,6 +33,17 @@ CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp -E "
CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp "
LD="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ld "
export LDFLAGS=" -L${QNX_TARGET}/${LIBDIR}/usr/lib -L${QNX_TARGET}/${LIBDIR}/lib -L${QNX_HOST}/usr/lib/gcc/${TARGET_HOST}/4.6.3 -lgcc -lasound -laudio_manager"
-export CFLAGS=" -g -fPIC -DPJMEDIA_AUDIO_DEV_HAS_BB10=1 "
+export CFLAGS=" -g -fPIC -DPJ_CONFIG_BB10=1 -DPJMEDIA_AUDIO_DEV_HAS_BB10=1"
+# Invoke configure
./configure --host=${TARGET_HOST} --disable-oss $*
+RETVAL=$?
+
+# Write to pjsip.pri only if configure was successful
+if test $RETVAL -eq 0; then
+ echo "# Config file to be included in app's .pro file" > pjsip.pri
+ echo "# Auto-generated by 'configure-bb10 $*'" >> pjsip.pri
+ make -f bb10-config.mak >> pjsip.pri
+fi
+
+