编译好的库下载地址:pjsip
一、源码下载
进入网址http://www.pjsip.org/download.htm,下载pjsip源码压缩包pjproject-2.7.1.tar.bz2
二、编译准备
1. 在虚拟机下使用tar jxvf pjproject-2.7.1.tar.bz2命令解压压缩包。
2. 进入pjproject-2.7.1/pjlib/include/pj目录下,新建config_site.h文件
config_site.h内容如下
/* Activate Android specific settings in the 'config_site_sample.h' */
#define PJ_CONFIG_ANDROID 1
#include
3.设置Android NDK编译环境
export ANDROID_NDK_ROOT=/usr/android/android-ndk-r14b
4.新建pjsip.sh脚本
#pjsip.sh脚本
LDFLAGS=-nostdlib
CC=/usr/android/android-ndk-r14b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
export CC
sysroot=/usr/android/android-ndk-r14b/platforms/android-16/arch-arm
NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=armeabi-v7a APP_PLATFORM=android-21 ./configure-android --use-ndk-cflags --enable-shared
NDK_TOOLCHAIN_VERSION:编译器类型、版本
TARGET_ABI:可以选择指定单个目标体系结构,例如armeabi-v7a、mips、x86。默认情况下,目标体系结构是armeabi。只在指定的时候使用-use-ndk-cflags
APP_PLATFORM:可以选择指定平台级别,例如android-9。默认情况下,configure将使用探测到的最大平台级别
--use-ndk-cflags:系统选项,使用此选项时,需要使用Android NDK r9或更高版本。
--enable-shared:生成动态库
三、编译
1. 使用chmod +x pjsip.sh给脚本授权
2. 执行./pjsip.sh
3. make dep && make
生成的库在lib目录下
pjproject-2.7.1/pjlib/lib
pjproject-2.7.1/pjlib-util/lib
pjproject-2.7.1/pjnath/lib
三、取消动态库pjsip的软连接
注意:如果需要取消pjsip库的软连接,则需要分别修改目录下的Makefile文件,再根据以上步骤编译完成生成静态库和动态库。
1. 修改pjproject-2.7.1\pjlib\build目录下的Makefile
include ../../build.mak
include ../../version.mak
include $(PJDIR)/build/common.mak
export LIBDIR := ../lib
export BINDIR := ../bin
RULES_MAK := $(PJDIR)/build/rules.mak
export PJLIB_LIB := libpj-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
#export PJLIB_SONAME := libpj.$(SHLIB_SUFFIX)
#export PJLIB_SHLIB := $(PJLIB_SONAME).$(PJ_VERSION_MAJOR)
export PJLIB_SONAME := libpj
export PJLIB_SHLIB := $(PJLIB_SONAME).$(SHLIB_SUFFIX)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC)../include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(APP_LDFLAGS) $(LDFLAGS)
###############################################################################
# Defines for building PJLIB library
#
export PJLIB_SRCDIR = ../src/pj
export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
activesock.o array.o config.o ctype.o errno.o except.o fifobuf.o \
guid.o hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \
os_info.o pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \
rbtree.o sock_common.o sock_qos_common.o \
ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \
string.o timer.o types.o
export PJLIB_CFLAGS += $(_CFLAGS)
export PJLIB_CXXFLAGS += $(_CXXFLAGS)
export PJLIB_LDFLAGS += $(_LDFLAGS)
###############################################################################
# Defines for building test application
#
export TEST_SRCDIR = ../src/pjlib-test
export TEST_OBJS += activesock.o atomic.o echo_clt.o errno.o exception.o \
fifobuf.o file.o hash_test.o ioq_perf.o ioq_udp.o \
ioq_unreg.o ioq_tcp.o \
list.o mutex.o os.o pool.o pool_perf.o rand.o rbtree.o \
select.o sleep.o sock.o sock_perf.o ssl_sock.o \
string.o test.o thread.o timer.o timestamp.o \
udp_echo_srv_sync.o udp_echo_srv_ioqueue.o \
util.o
export TEST_CFLAGS += $(_CFLAGS)
export TEST_CXXFLAGS += $(_CXXFLAGS)
export TEST_LDFLAGS += $(PJLIB_LDLIB) $(_LDFLAGS)
export TEST_EXE := pjlib-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
#
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
#
all: $(TARGETS) $(TARGETS_EXE)
lib: $(TARGETS)
doc:
cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg
@if [ -n "$(WWWDIR)" ] && ! [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjlib/docs/html" ] ; then \
echo "Creating docs/$(PJ_VERSION)/pjlib/docs/html" ; \
mkdir -p $(WWWDIR)/docs/$(PJ_VERSION)/pjlib/docs/html ; \
fi
@if [ -n "$(WWWDIR)" ] && [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjlib/docs/html" ] ; then \
echo "Copying docs/$(PJ_VERSION) to $(WWWDIR)/docs/$(PJ_VERSION)/pjlib/docs/html.." ; \
cp -v -a ../docs/$(PJ_VERSION)/html/* $(WWWDIR)/docs/$(PJ_VERSION)/pjlib/docs/html/ ; \
fi
print:
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib print_lib
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test print_bin
depend: ../include/pj/config_site.h
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib depend
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test depend
echo '$(BINDIR)/$(TEST_EXE): $(LIBDIR)/$(PJLIB_LIB)' >> .pjlib-test-$(TARGET_NAME).depend
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(PJLIB_LIB) $(PJLIB_SHLIB)
.PHONY: $(TEST_EXE)
dep: depend
pjlib: $(PJLIB_LIB)
$(PJLIB_LIB): ../include/pj/config_site.h
$(PJLIB_SHLIB): $(PJLIB_LIB)
$(PJLIB_LIB) $(PJLIB_SHLIB):
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
../include/pj/config_site.h:
touch ../include/pj/config_site.h
pjlib-test: $(TEST_EXE)
$(TEST_EXE): $(PJLIB_LIB) $(PJLIB_SHLIB)
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
.PHONY: pjlib.ko
pjlib.ko:
echo Making $@
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
.PHONY: pjlib-test.ko
pjlib-test.ko:
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean:
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib clean
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test clean
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-$(TARGET_NAME).depend),$(HOST_RMR))
$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-test-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib realclean
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test realclean
distclean: realclean
gcov-report:
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib gcov-report
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test gcov-report
2. 修改pjproject-2.7.1\pjlib-util\build目录下的Makefile文件
# By default, the test application includes main.o.
# OS make file may override this with os-specific files
export UTIL_TEST_OBJS = main.o
include ../../build.mak
include ../../version.mak
include $(PJDIR)/build/common.mak
export LIBDIR := ../lib
export BINDIR := ../bin
RULES_MAK := $(PJDIR)/build/rules.mak
PJLIB_LIB:=$(PJDIR)/pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
export PJLIB_UTIL_LIB := libpjlib-util-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
#export PJLIB_UTIL_SONAME := libpjlib-util.$(SHLIB_SUFFIX)
#export PJLIB_UTIL_SHLIB := $(PJLIB_UTIL_SONAME).$(PJ_VERSION_MAJOR)
export PJLIB_UTIL_SONAME := libpjlib-util
export PJLIB_UTIL_SHLIB := $(PJLIB_UTIL_SONAME).$(SHLIB_SUFFIX)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(APP_LDFLAGS) $(LDFLAGS)
###############################################################################
# Defines for building PJLIB-UTIL library
#
export PJLIB_UTIL_SRCDIR = ../src/pjlib-util
export PJLIB_UTIL_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
base64.o cli.o cli_console.o cli_telnet.o crc32.o errno.o dns.o \
dns_dump.o dns_server.o getopt.o hmac_md5.o hmac_sha1.o \
http_client.o json.o md5.o pcap.o resolver.o scanner.o sha1.o \
srv_resolver.o string.o stun_simple.o \
stun_simple_client.o xml.o
export PJLIB_UTIL_CFLAGS += $(_CFLAGS)
export PJLIB_UTIL_CXXFLAGS += $(_CXXFLAGS)
export PJLIB_UTIL_LDFLAGS += $(PJLIB_LDLIB) $(_LDFLAGS)
###############################################################################
# Defines for building test application
#
export UTIL_TEST_SRCDIR = ../src/pjlib-util-test
export UTIL_TEST_OBJS += xml.o encryption.o stun.o resolver_test.o test.o \
json_test.o http_client.o
export UTIL_TEST_CFLAGS += $(_CFLAGS)
export UTIL_TEST_CXXFLAGS += $(_CXXFLAGS)
export UTIL_TEST_LDFLAGS += $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
export UTIL_TEST_EXE:=pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
TARGETS := $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SHLIB)
TARGETS_EXE := $(UTIL_TEST_EXE)
all: $(TARGETS) $(TARGETS_EXE)
lib: $(TARGETS)
doc:
cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg
@if [ -n "$(WWWDIR)" ] && ! [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjlib-util/docs/html" ] ; then \
echo "Creating docs/$(PJ_VERSION)/pjlib-util/docs/html" ; \
mkdir -p $(WWWDIR)/docs/$(PJ_VERSION)/pjlib-util/docs/html ; \
fi
@if [ -n "$(WWWDIR)" ] && [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjlib-util/docs/html" ] ; then \
echo "Copying docs/$(PJ_VERSION) to $(WWWDIR)/docs/$(PJ_VERSION)/pjlib-util/docs/html.." ; \
cp -v -a ../docs/$(PJ_VERSION)/html/* $(WWWDIR)/docs/$(PJ_VERSION)/pjlib-util/docs/html/ ; \
fi
dep: depend
distclean: realclean
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SHLIB)
.PHONY: $(UTIL_TEST_EXE)
pjlib-util: $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SHLIB)
$(PJLIB_UTIL_SHLIB): $(PJLIB_UTIL_LIB)
$(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SHLIB): $(PJLIB_LIB) $(PJLIB_SONAME)
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
pjlib-util-test: $(UTIL_TEST_EXE)
$(UTIL_TEST_EXE): $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SHLIB)
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
.PHONY: pjlib-util.ko
pjlib-util.ko:
echo Making $@
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
.PHONY: pjlib-util-test.ko
pjlib-util-test.ko:
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean:
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-util-$(TARGET_NAME).depend),$(HOST_RMR))
$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-util-test-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
depend:
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
echo '$(BINDIR)/$(UTIL_TEST_EXE): $(LIBDIR)/$(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjlib-util-test-$(TARGET_NAME).depend; \
3. 修改pjproject-2.7.1\pjnath\build目录下的Makefile文件
# By default, the test application includes main.o.
# OS make file may override this with os-specific files
export PJNATH_TEST_OBJS = main.o
include ../../build.mak
include ../../version.mak
include $(PJDIR)/build/common.mak
export LIBDIR := ../lib
export BINDIR := ../bin
RULES_MAK := $(PJDIR)/build/rules.mak
PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
export PJNATH_LIB:=libpjnath-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
#export PJNATH_SONAME := libpjnath.$(SHLIB_SUFFIX)
#export PJNATH_SHLIB := $(PJNATH_SONAME).$(PJ_VERSION_MAJOR)
export PJNATH_SONAME := libpjnath
export PJNATH_SHLIB := $(PJNATH_SONAME).$(SHLIB_SUFFIX)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include \
$(CC_INC)../../pjlib-util/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(APP_LDFLAGS) $(LDFLAGS)
###############################################################################
# Defines for building PJNATH library
#
export PJNATH_SRCDIR = ../src/pjnath
export PJNATH_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
errno.o ice_session.o ice_strans.o nat_detect.o stun_auth.o \
stun_msg.o stun_msg_dump.o stun_session.o stun_sock.o \
stun_transaction.o turn_session.o turn_sock.o
export PJNATH_CFLAGS += $(_CFLAGS)
export PJNATH_CXXFLAGS += $(_CXXFLAGS)
export PJNATH_LDFLAGS += $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
###############################################################################
# Defines for building test application
#
export PJNATH_TEST_SRCDIR = ../src/pjnath-test
export PJNATH_TEST_OBJS += ice_test.o stun.o sess_auth.o server.o concur_test.o \
stun_sock_test.o turn_sock_test.o test.o
export PJNATH_TEST_CFLAGS += $(_CFLAGS)
export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS)
export PJNATH_TEST_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
export PJNATH_TEST_EXE:=pjnath-test-$(TARGET_NAME)$(HOST_EXE)
###############################################################################
# Defines for building TURN client application
#
export PJTURN_CLIENT_SRCDIR = ../src/pjturn-client
export PJTURN_CLIENT_OBJS += client_main.o
export PJTURN_CLIENT_CFLAGS += $(_CFLAGS)
export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_CLIENT_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
export PJTURN_CLIENT_EXE:=pjturn-client-$(TARGET_NAME)$(HOST_EXE)
###############################################################################
# Defines for building TURN server application
#
export PJTURN_SRV_SRCDIR = ../src/pjturn-srv
export PJTURN_SRV_OBJS += allocation.o auth.o listener_udp.o \
listener_tcp.o server.o main.o
export PJTURN_SRV_CFLAGS += $(_CFLAGS)
export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_SRV_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
export PJTURN_SRV_EXE:=pjturn-srv-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
TARGETS := $(PJNATH_LIB) $(PJNATH_SHLIB)
TARGETS_EXE := $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE)
all: $(TARGETS) $(TARGETS_EXE)
lib: $(TARGETS)
doc:
cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg
@if [ -n "$(WWWDIR)" ] && ! [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjnath/docs/html" ] ; then \
echo "Creating docs/$(PJ_VERSION)/pjnath/docs/html" ; \
mkdir -p $(WWWDIR)/docs/$(PJ_VERSION)/pjnath/docs/html ; \
fi
@if [ -n "$(WWWDIR)" ] && [ -d "$(WWWDIR)/docs/$(PJ_VERSION)/pjnath/docs/html" ] ; then \
echo "Copying docs/$(PJ_VERSION) to $(WWWDIR)/docs/$(PJ_VERSION)/pjnath/docs/html.." ; \
cp -v -a ../docs/$(PJ_VERSION)/html/* $(WWWDIR)/docs/$(PJ_VERSION)/pjnath/docs/html/ ; \
fi
dep: depend
distclean: realclean
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(PJNATH_LIB) $(PJNATH_SHLIB)
.PHONY: $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE)
pjnath: $(PJNATH_LIB)
$(PJNATH_SHLIB): $(PJNATH_LIB)
$(PJNATH_LIB) $(PJNATH_SHLIB): $(PJLIB_LIB) $(PJLIB_SONAME) $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SONAME)
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
pjnath-test: $(PJNATH_TEST_EXE)
$(PJNATH_TEST_EXE): $(PJNATH_LIB) $(PJNATH_SHLIB)
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
pjturn-client: $(PJTURN_CLIENT_EXE)
$(PJTURN_CLIENT_EXE): $(PJNATH_LIB) $(PJNATH_SHLIB)
$(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
pjturn-srv: $(PJTURN_SRV_EXE)
$(PJTURN_SRV_EXE): $(PJNATH_LIB) $(PJNATH_SONAME)
$(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
.PHONY: pjnath.ko
pjnath.ko:
echo Making $@
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
.PHONY: pjnath-test.ko
pjnath-test.ko:
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean:
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $@
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.pjnath-$(TARGET_NAME).depend),$(HOST_RMR))
$(subst @@,$(subst /,$(HOST_PSEP),.pjnath-test-$(TARGET_NAME).depend),$(HOST_RMR))
$(subst @@,$(subst /,$(HOST_PSEP),.pjturn-client-$(TARGET_NAME).depend),$(HOST_RMR))
$(subst @@,$(subst /,$(HOST_PSEP),.pjturn-srv-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $@
depend:
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $@
$(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $@
echo '$(BINDIR)/$(PJNATH_TEST_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjnath-test-$(TARGET_NAME).depend
echo '$(BINDIR)/$(PJTURN_CLIENT_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-client-$(TARGET_NAME).depend
echo '$(BINDIR)/$(PJTURN_SRV_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-srv-$(TARGET_NAME).depend