summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-17 16:16:01 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-17 16:16:01 +0000
commit05faf09b3f03f8b704e00c1ee533fa2534682109 (patch)
treedfffccc9dc00fbb0e427022207eda071f4e211a9
parentc82fed9c2902aed74ea5da08148983159e581ad7 (diff)
Fixed build system for third_party
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/split-3rd-party@1201 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-xaconfigure17
-rw-r--r--aconfigure.ac12
-rw-r--r--build.mak.in35
-rw-r--r--pjmedia/build/Makefile44
-rw-r--r--pjmedia/build/os-auto.mak.in66
-rw-r--r--pjnath/build/Makefile7
-rw-r--r--pjsip-apps/build/Makefile21
-rw-r--r--pjsip-apps/build/Samples.mak37
-rw-r--r--pjsip/build/Makefile18
-rw-r--r--third_party/Makefile49
-rw-r--r--third_party/Makefile.in49
l---------third_party/build/portaudio/src/pa_linux_alsa.h1
12 files changed, 165 insertions, 191 deletions
diff --git a/aconfigure b/aconfigure
index ca8f5e43..66fbcf92 100755
--- a/aconfigure
+++ b/aconfigure
@@ -859,7 +859,6 @@ Optional Features:
--disable-sound Exclude sound (i.e. use null sound)
--disable-small-filter Exclude small filter in resampling
--disable-large-filter Exclude large filter in resampling
- --disable-g711-plc Exclude G.711 Annex A PLC
--disable-speex-aec Exclude Speex Acoustic Echo Canceller/AEC
--disable-g711-codec Exclude G.711 codecs from the build
--disable-l16-codec Exclude Linear/L16 codec family from the build
@@ -1440,7 +1439,7 @@ test -n "$target_alias" &&
program_prefix=${target_alias}-
ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h"
- ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/portaudio/Makefile"
+ ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/Makefile third_party/build/portaudio/Makefile"
@@ -9014,19 +9013,8 @@ else
echo "${ECHO_T}Checking if large filter is disabled... no" >&6
fi;
+ac_no_g711_plc=yes
-# Check whether --enable-g711-plc or --disable-g711-plc was given.
-if test "${enable_g711_plc+set}" = set; then
- enableval="$enable_g711_plc"
- if test "$enable_g711_plc" = "no"; then
- ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0'
- echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...yes" >&5
-echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...yes" >&6
- fi
-else
- echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...no" >&5
-echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...no" >&6
-fi;
# Check whether --enable-speex-aec or --disable-speex-aec was given.
@@ -10093,6 +10081,7 @@ do
"pjlib-util/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;;
"pjmedia/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;;
"pjsip/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjsip/build/os-auto.mak" ;;
+ "third_party/Makefile" ) CONFIG_FILES="$CONFIG_FILES third_party/Makefile" ;;
"third_party/build/portaudio/Makefile" ) CONFIG_FILES="$CONFIG_FILES third_party/build/portaudio/Makefile" ;;
"pjlib/include/pj/compat/os_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;;
"pjlib/include/pj/compat/m_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;;
diff --git a/aconfigure.ac b/aconfigure.ac
index 072f6502..44a25ade 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -17,6 +17,7 @@ AC_CONFIG_FILES([build.mak
pjlib-util/build/os-auto.mak
pjmedia/build/os-auto.mak
pjsip/build/os-auto.mak
+ third_party/Makefile
third_party/build/portaudio/Makefile
])
@@ -318,17 +319,6 @@ AC_ARG_ENABLE(large-filter,
fi],
AC_MSG_RESULT([Checking if large filter is disabled... no]))
-dnl # Include G.711 Annex A PLC
-AC_SUBST(ac_no_g711_plc)
-AC_ARG_ENABLE(g711-plc,
- AC_HELP_STRING([--disable-g711-plc],
- [Exclude G.711 Annex A PLC]),
- [if test "$enable_g711_plc" = "no"; then
- [ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0']
- AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...yes])
- fi],
- AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...no]))
-
dnl # Include Speex AEC
AC_SUBST(ac_no_speex_aec)
AC_ARG_ENABLE(speex-aec,
diff --git a/build.mak.in b/build.mak.in
index 43633e1f..7df03a82 100644
--- a/build.mak.in
+++ b/build.mak.in
@@ -7,20 +7,43 @@ export TARGET_NAME := @target@
export CROSS_COMPILE := @ac_cross_compile@
export LINUX_POLL := @ac_linux_poll@
-# Application can use this
+# Determine which party libraries to use
+export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME)
+
+ifneq (@ac_no_gsm_codec@,1)
+APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME)
+endif
+
+ifneq (@ac_no_speex_codec@,1)
+APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME)
+endif
+
+ifneq (@ac_no_ilbc_codec@,1)
+APP_THIRD_PARTY_LIBS += -lilbccodec-$(TARGET_NAME)
+endif
+
+ifneq ($(findstring pa,@ac_pjmedia_snd@),)
+APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME)
+endif
+
+
+# CFLAGS, LDFLAGS, and LIBS to be used by applications
export PJDIR := @ac_pjdir@
export APP_CC := $(CROSS_COMPILE)$(CC_NAME)
export APP_CFLAGS := -DPJ_AUTOCONF=1\
@CFLAGS@\
-I$(PJDIR)/pjlib/include\
-I$(PJDIR)/pjlib-util/include\
+ -I$(PJDIR)/pjnath/include\
-I$(PJDIR)/pjmedia/include\
-I$(PJDIR)/pjsip/include
export APP_CXXFLAGS := $(APP_CFLAGS)
export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
-L$(PJDIR)/pjlib-util/lib\
+ -L$(PJDIR)/pjnath/lib\
-L$(PJDIR)/pjmedia/lib\
-L$(PJDIR)/pjsip/lib\
+ -L$(PJDIR)/third_party/lib\
@LDFLAGS@
export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
-lpjsip-ua-$(TARGET_NAME)\
@@ -28,8 +51,16 @@ export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
-lpjsip-$(TARGET_NAME)\
-lpjmedia-codec-$(TARGET_NAME)\
-lpjmedia-$(TARGET_NAME)\
- -lpjmedia-codec-$(TARGET_NAME)\
+ -lpjnath-$(TARGET_NAME)\
-lpjlib-util-$(TARGET_NAME)\
+ $(APP_THIRD_PARTY_LIBS)\
-lpj-$(TARGET_NAME)\
@LIBS@
+export PJ_DIR := $(PJDIR)
+export PJ_CC := $(APP_CC)
+export PJ_CFLAGS := $(APP_CFLAGS)
+export PJ_CXXFLAGS := $(APP_CXXFLAGS)
+export PJ_LDFLAGS := $(APP_LDFLAGS)
+export PJ_LDLIBS := $(APP_LDLIBS)
+
diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile
index 9cea915d..7e9d060d 100644
--- a/pjmedia/build/Makefile
+++ b/pjmedia/build/Makefile
@@ -1,6 +1,7 @@
include ../../build.mak
include $(PJDIR)/build/common.mak
+THIRD_PARTY:=../../third_party
RULES_MAK := $(PJDIR)/build/rules.mak
PJLIB_LIB:=$(PJDIR)/pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
@@ -21,7 +22,7 @@ export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CC_INC)../../pjlib/include \
$(CC_INC)../../pjlib-util/include \
$(CC_INC)../../pjnath/include \
- $(CC_INC)../src/pjmedia/portaudio
+ $(CC_INC)../..
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
@@ -40,8 +41,8 @@ export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
conference.o echo_common.o echo_port.o echo_speex.o \
echo_suppress.o endpoint.o errno.o \
g711.o jbuf.o master_port.o mem_capture.o mem_player.o \
- mp3_writer.o null_port.o plc_common.o plc_steveu.o \
- port.o splitcomb.o resample.o \
+ null_port.o plc_common.o port.o splitcomb.o \
+ resample_resample.o \
resample_port.o rtcp.o rtp.o sdp.o sdp_cmp.o sdp_neg.o \
session.o silencedet.o sound_port.o stream.o \
tonegen.o transport_ice.o transport_udp.o \
@@ -66,43 +67,6 @@ export PJSDP_CFLAGS += $(_CFLAGS)
###############################################################################
# Defines for building PJMEDIA-Codec library
#
-GSM_OBJS := gsm.o \
- gsm/add.o gsm/code.o gsm/decode.o \
- gsm/gsm_create.o gsm/gsm_decode.o gsm/gsm_destroy.o \
- gsm/gsm_encode.o gsm/gsm_explode.o gsm/gsm_implode.o \
- gsm/gsm_option.o gsm/long_term.o \
- gsm/lpc.o gsm/preprocess.o gsm/rpe.o gsm/short_term.o \
- gsm/table.o
-GSM_CFLAGS :=
-
-SPEEX_OBJS := speex_codec.o \
- speex/bits.o speex/cb_search.o speex/exc_10_16_table.o \
- speex/exc_10_32_table.o speex/exc_20_32_table.o \
- speex/exc_5_256_table.o speex/exc_5_64_table.o \
- speex/exc_8_128_table.o speex/fftwrap.o speex/filterbank.o \
- speex/filters.o speex/gain_table.o speex/gain_table_lbr.o \
- speex/hexc_10_32_table.o speex/hexc_table.o \
- speex/high_lsp_tables.o speex/jitter.o \
- speex/kiss_fft.o speex/kiss_fftr.o speex/lpc_spx.o \
- speex/lsp.o speex/lsp_tables_nb.o speex/ltp.o \
- speex/math_approx.o speex/misc.o speex/mdf.o speex/modes.o \
- speex/nb_celp.o speex/preprocess_spx.o \
- speex/quant_lsp.o speex/sb_celp.o speex/smallft.o \
- speex/speex.o speex/speex_callbacks.o speex/speex_header.o \
- speex/stereo.o speex/vbr.o speex/vq.o speex/window.o
-SPEEX_CFLAGS := -DHAVE_CONFIG_H=1 -I../src/pjmedia-codec
-
-ILBC_OBJS := ilbc.o \
- ilbc/FrameClassify.o ilbc/LPCdecode.o ilbc/LPCencode.o \
- ilbc/StateConstructW.o ilbc/StateSearchW.o ilbc/anaFilter.o \
- ilbc/constants.o ilbc/createCB.o ilbc/doCPLC.o \
- ilbc/enhancer.o ilbc/filter.o ilbc/gainquant.o \
- ilbc/getCBvec.o ilbc/helpfun.o ilbc/hpInput.o \
- ilbc/hpOutput.o ilbc/iCBConstruct.o ilbc/iCBSearch.o \
- ilbc/iLBC_decode.o ilbc/iLBC_encode.o ilbc/lsf.o \
- ilbc/packing.o ilbc/syntFilter.o
-ILBC_CFLAGS :=
-
export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec
export PJMEDIA_CODEC_OBJS += \
$(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in
index 9f444690..3c95d0d9 100644
--- a/pjmedia/build/os-auto.mak.in
+++ b/pjmedia/build/os-auto.mak.in
@@ -1,7 +1,7 @@
# @configure_input@
# PJMEDIA features exclusion
-export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_g711_plc@ @ac_no_speex_aec@
+export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@
# Define the desired sound device backend
# Valid values are:
@@ -44,77 +44,29 @@ endif
ifeq ($(AC_NO_GSM_CODEC),1)
export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
else
-export CODEC_OBJS += $(GSM_OBJS)
+export CODEC_OBJS += gsm.o
endif
ifeq ($(AC_NO_SPEEX_CODEC),1)
export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
else
-export CODEC_OBJS += $(SPEEX_OBJS)
+export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
+export CODEC_OBJS += speex_codec.o
endif
ifeq ($(AC_NO_ILBC_CODEC),1)
export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
else
-export CODEC_OBJS += $(ILBC_OBJS)
+export CODEC_OBJS += ilbc.o
endif
#
-# PortAudio on Unix
+# PortAudio
#
-ifeq ($(AC_PJMEDIA_SND),pa_unix)
-# Host APIs and utils
-export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_hostapis.o $(PA_DIR)/pa_unix_util.o
-
-# Include ALSA?
-ifeq ($(AC_PA_USE_ALSA),1)
-export CFLAGS += -DPA_USE_ALSA=1
-export PJMEDIA_OBJS += $(PA_DIR)/pa_linux_alsa.o
-endif
-
-export CFLAGS += -DPA_USE_OSS=1 \
- -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
-export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_oss.o
-endif
-
-
-#
-# PortAudio on MacOS X (using current PortAudio)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
-export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o \
- $(PA_DIR)/pa_unix_util.o \
- $(PA_DIR)/pa_mac_core.o \
- $(PA_DIR)/pa_mac_core_blocking.o \
- $(PA_DIR)/pa_mac_core_utilities.o \
- $(PA_DIR)/ringbuffer.o
-export CFLAGS += -DPA_USE_COREAUDIO=1 \
- -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
-export CFLAGS += @ac_pa_cflags@
-endif
-
-#
-# PortAudio on MacOS X (using old PortAudio, for MacOS X 10.2.x)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_old_darwinos)
-export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o \
- $(PA_DIR)/pa_unix_util.o \
- $(PA_DIR)/pa_mac_core_old.o
-export CFLAGS += -DPA_USE_COREAUDIO=1 \
- -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
-export CFLAGS += @ac_pa_cflags@
-endif
-
-#
-#
-# PortAudio on Win32 (WMME)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_win32)
-export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \
- $(PA_DIR)/pa_win_wmme.o
-export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS \
- -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
+export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export SOUND_OBJS = pasound.o
endif
#
diff --git a/pjnath/build/Makefile b/pjnath/build/Makefile
index 95299261..390bfd06 100644
--- a/pjnath/build/Makefile
+++ b/pjnath/build/Makefile
@@ -2,9 +2,10 @@
# OS make file may override this with os-specific files
export PJNATH_TEST_OBJS = main.o
-include ../../build/common.mak
+include ../../build.mak
+include $(PJDIR)/build/common.mak
-RULES_MAK := ../../build/rules.mak
+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)
@@ -65,7 +66,7 @@ distclean: realclean
pjnath:
$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(PJNATH_LIB)
-pjnath-test: $(PJLIB_LIB)
+pjnath-test: $(PJLIB_LIB) $(PJLIB_UTIL_LIB) $(PJNATH_LIB)
$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(PJNATH_TEST_EXE)
.PHONY: ../lib/pjnath.ko
diff --git a/pjsip-apps/build/Makefile b/pjsip-apps/build/Makefile
index fe6a1355..134850b0 100644
--- a/pjsip-apps/build/Makefile
+++ b/pjsip-apps/build/Makefile
@@ -1,6 +1,8 @@
-include ../../build/common.mak
+include ../../build.mak
+include $(PJDIR)/build/common.mak
-RULES_MAK := ../../build/rules.mak
+
+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)
@@ -24,19 +26,6 @@ export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CC_INC)../../pjmedia/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
- $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
- $(LDFLAGS) -lm
-
###############################################################################
# Defines for building PJSUA
@@ -45,7 +34,7 @@ export PJSUA_SRCDIR = ../src/pjsua
export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
main.o pjsua_app.o
export PJSUA_CFLAGS += $(_CFLAGS)
-export PJSUA_LDFLAGS += $(_LDFLAGS)
+export PJSUA_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS)
export PJSUA_EXE:=../bin/pjsua-$(TARGET_NAME)$(HOST_EXE)
diff --git a/pjsip-apps/build/Samples.mak b/pjsip-apps/build/Samples.mak
index 66113fda..edc69d17 100644
--- a/pjsip-apps/build/Samples.mak
+++ b/pjsip-apps/build/Samples.mak
@@ -1,44 +1,13 @@
include ../../build/common.mak
-PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
-PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
-PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
-PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
-PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
-PJSIP_LIB:=../../pjsip/lib/libpjsip-$(TARGET_NAME)$(LIBEXT)
-PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT)
-PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT)
-PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(TARGET_NAME)$(LIBEXT)
-
###############################################################################
# Gather all flags.
#
-export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
- $(CFLAGS) $(CC_INC)../../pjsip/include \
- $(CC_INC)../../pjlib/include \
- $(CC_INC)../../pjlib-util/include \
- $(CC_INC)../../pjnath/include \
- $(CC_INC)../../pjmedia/include
-export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
- $(HOST_CXXFLAGS) $(CXXFLAGS)
-
-export LIBS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_LIB))
-
-
-export _LDFLAGS := $(LIBS) \
- $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
- $(LDFLAGS) -lm
+export _CFLAGS := $(PJ_CFLAGS)
+export _CXXFLAGS:= $(PJ_CXXFLAGS)
+export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS)
SRCDIR := ../src/samples
OBJDIR := ./output/samples-$(TARGET_NAME)
diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile
index cf93fa53..66b86f11 100644
--- a/pjsip/build/Makefile
+++ b/pjsip/build/Makefile
@@ -3,9 +3,10 @@
# For example, see os-rtems.mak in current directory.
export TEST_OBJS = main.o
-include ../../build/common.mak
+include ../../build.mak
+include $(PJDIR)/build/common.mak
-RULES_MAK := ../../build/rules.mak
+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)
@@ -29,17 +30,6 @@ export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CC_INC)../../pjmedia/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
- $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
- $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
- $(LDFLAGS)
-
###############################################################################
# Defines for building PJSIP core library
@@ -99,7 +89,7 @@ export TEST_OBJS += dlg_core_test.o dns_test.o msg_err_test.o \
tsx_basic_test.o tsx_bench.o tsx_uac_test.o \
tsx_uas_test.o txdata_test.o uri_test.o
export TEST_CFLAGS += $(_CFLAGS)
-export TEST_LDFLAGS += $(_LDFLAGS)
+export TEST_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS)
export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE)
diff --git a/third_party/Makefile b/third_party/Makefile
new file mode 100644
index 00000000..6a43479c
--- /dev/null
+++ b/third_party/Makefile
@@ -0,0 +1,49 @@
+include ../build.mak
+include $(PJDIR)/build/host-$(HOST_NAME).mak
+
+DIRS = build/resample
+
+ifeq (,1)
+else
+DIRS += build/gsm
+endif
+
+ifeq (,1)
+else
+DIRS += build/ilbc
+endif
+
+ifeq (,1)
+else
+DIRS += build/speex
+endif
+
+ifeq (pa_unix,pa_old_darwinos)
+DIRS += build/portaudio
+endif
+
+ifeq (pa_unix,pa_darwinos)
+DIRS += build/portaudio
+endif
+
+ifeq (pa_unix,pa_win32)
+DIRS += build/portaudio
+endif
+
+ifeq (pa_unix,pa_unix)
+DIRS += build/portaudio
+endif
+
+
+
+all clean dep depend distclean realclean:
+ for dir in $(DIRS); do \
+ if [ -d $$dir ]; then \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
+
diff --git a/third_party/Makefile.in b/third_party/Makefile.in
new file mode 100644
index 00000000..43c646d4
--- /dev/null
+++ b/third_party/Makefile.in
@@ -0,0 +1,49 @@
+include ../build.mak
+include $(PJDIR)/build/host-$(HOST_NAME).mak
+
+DIRS = build/resample
+
+ifeq (@ac_no_gsm_codec@,1)
+else
+DIRS += build/gsm
+endif
+
+ifeq (@ac_no_ilbc_codec@,1)
+else
+DIRS += build/ilbc
+endif
+
+ifeq (@ac_no_speex_codec@,1)
+else
+DIRS += build/speex
+endif
+
+ifeq (@ac_pjmedia_snd@,pa_old_darwinos)
+DIRS += build/portaudio
+endif
+
+ifeq (@ac_pjmedia_snd@,pa_darwinos)
+DIRS += build/portaudio
+endif
+
+ifeq (@ac_pjmedia_snd@,pa_win32)
+DIRS += build/portaudio
+endif
+
+ifeq (@ac_pjmedia_snd@,pa_unix)
+DIRS += build/portaudio
+endif
+
+
+
+all clean dep depend distclean realclean:
+ for dir in $(DIRS); do \
+ if [ -d $$dir ]; then \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
+
diff --git a/third_party/build/portaudio/src/pa_linux_alsa.h b/third_party/build/portaudio/src/pa_linux_alsa.h
new file mode 120000
index 00000000..a97f6eb0
--- /dev/null
+++ b/third_party/build/portaudio/src/pa_linux_alsa.h
@@ -0,0 +1 @@
+../../../portaudio/include/pa_linux_alsa.h \ No newline at end of file