Re #1657: fixed the pjsip.pri generation script for linking with external third party libraries

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4488 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2013-04-23 05:39:13 +00:00
parent a43835d276
commit 6b1c8dce5b
2 changed files with 7 additions and 3 deletions

View File

@ -9,9 +9,10 @@
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))))))
PJ_BB_LIBS = $(filter-out -lm -lsocket, $(APP_LDLIBS))
# This used to generate the library path list (the "-Lxxx" options)
# We replace the path with "$$PJ_DIR"
PJ_BB_LDFLAGS = $(subst $(PJDIR),\$$\$$PJ_DIR,$(APP_LDFLAGS))
all:
@ -26,7 +27,7 @@ all:
@echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjsip/include)'
@echo
@for token in $(PJ_BB_LDFLAGS); do \
if echo $$token | grep -- '-L\$$' >> /dev/null; then \
if echo $$token | grep -- '-L' >> /dev/null; then \
echo "PJ_LIBPATH += \$$\$$quote($$token)"; \
fi; \
done
@ -38,6 +39,6 @@ all:
@echo 'INCLUDEPATH += $$$$PJ_INCLUDEPATH'
@echo 'LIBS += $$$$PJ_LIBPATH'
@echo 'LIBS += $$$$PJ_LIBS'
@echo 'LIBS += -lOpenAL -lalut -laudio_manager -lsocket -lasound -lbbsystem'
@echo 'LIBS += -lOpenAL -lalut -laudio_manager -lsocket -lasound -lbbsystem -lm'

View File

@ -44,6 +44,9 @@ 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
echo PJSIP config file for BB10 has been written to \'pjsip.pri\'. You can include this file from your application\'s .pro file.
echo
fi