Index: pjproject/branches/split-3rd-party/third_party/build/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/Makefile	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/Makefile	(revision 1202)
@@ -0,0 +1,12 @@
+include ../../build.mak
+include $(PJDIR)/build/common.mak
+
+all clean dep depend distclean realclean:
+	for dir in $(DIRS); do \
+		if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+		    true; \
+		else \
+		    exit 1; \
+		fi; \
+	done
+
Index: pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in	(revision 1202)
@@ -0,0 +1,17 @@
+DIRS = resample
+
+ifneq (@ac_no_gsm_codec@,1)
+DIRS += gsm
+endif
+
+ifneq (@ac_no_ilbc_codec@,1)
+DIRS += ilbc
+endif
+
+ifneq (@ac_no_speex_codec@,1)
+DIRS += speex
+endif
+
+ifneq ($(findstring pa,@ac_pjmedia_snd@),)
+DIRS += portaudio
+endif
Index: pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/os-linux.mak
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/os-linux.mak	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/os-linux.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/os-win32.mak
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/os-win32.mak	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/os-win32.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile	(revision 1202)
@@ -0,0 +1,69 @@
+# @configure_input@
+include ../../../build.mak
+include $(PJDIR)/build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export PORTAUDIO_LIB:=../../lib/libportaudio-$(TARGET_NAME)$(LIBEXT)
+
+PORTAUDIO_OBJS += pa_allocation.o \
+		  pa_converters.o \
+		  pa_cpuload.o \
+		  pa_dither.o \
+		  pa_debugprint.o \
+		  pa_front.o \
+		  pa_process.o \
+		  pa_skeleton.o \
+		  pa_stream.o \
+		  pa_trace.o
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	+= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)src 
+export _CXXFLAGS+= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS += $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PORTAUDIO library
+#
+export PORTAUDIO_SRCDIR = src
+export PORTAUDIO_OBJS += 
+export PORTAUDIO_CFLAGS += $(_CFLAGS)
+
+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.
+#
+TARGETS := libportaudio
+
+all: $(TARGETS)
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libportaudio clean realclean distclean
+
+libportaudio:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $(PORTAUDIO_LIB)
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.libportaudio-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+	echo '$(PORTAUDIO_LIB): .libportaudio-$(TARGET_NAME).depend' >> .libportaudio-$(TARGET_NAME).depend; \
+
Index: pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile.in
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile.in	(revision 1201)
+++ 	(revision )
@@ -1,141 +1,0 @@
-# @configure_input@
-include ../../../build.mak
-include $(PJDIR)/build/common.mak
-
-export LIBDIR := ../../lib
-
-RULES_MAK := $(PJDIR)/build/rules.mak
-
-export PORTAUDIO_LIB:=../../lib/libportaudio-$(TARGET_NAME)$(LIBEXT)
-
-PORTAUDIO_OBJS := pa_allocation.o \
-		  pa_converters.o \
-		  pa_cpuload.o \
-		  pa_dither.o \
-		  pa_front.o \
-		  pa_process.o \
-		  pa_skeleton.o \
-		  pa_stream.o \
-		  pa_trace.o
-
-
-# Define the desired sound device backend
-# Valid values are:
-#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
-#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
-#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
-#   - pa_win32:	    	PortAudio on Win32 (WMME)
-#
-# There are other values below, but these are handled by PJMEDIA's Makefile
-#   - ds:	    	Win32 DirectSound (dsound.c)
-#   - null:	    	Null sound device (nullsound.c)
-AC_PJMEDIA_SND=@ac_pjmedia_snd@
-
-# For Unix, specify if ALSA should be supported
-AC_PA_USE_ALSA=@ac_pa_use_alsa@
-
-# Additional PortAudio CFLAGS are in @ac_pa_cflags@
-
-
-#
-# PortAudio on Unix
-#
-ifeq ($(AC_PJMEDIA_SND),pa_unix)
-# Host APIs and utils
-export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
-
-# Include ALSA?
-ifeq ($(AC_PA_USE_ALSA),1)
-export CFLAGS += -DPA_USE_ALSA=1
-export PORTAUDIO_OBJS += pa_linux_alsa.o
-endif
-
-export CFLAGS += -DPA_USE_OSS=1
-export CFLAGS += @ac_pa_cflags@
-export PORTAUDIO_OBJS += pa_unix_oss.o
-endif
-
-
-#
-# PortAudio on MacOS X (using current PortAudio)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
-export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
-			pa_unix_util.o \
-			pa_mac_core.o \
-			pa_mac_core_blocking.o \
-			pa_mac_core_utilities.o \
-			pa_ringbuffer.o
-export CFLAGS += -DPA_USE_COREAUDIO=1
-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 PORTAUDIO_OBJS +=pa_mac_hostapis.o \
-			pa_unix_util.o \
-			pa_mac_core_old.o 
-export CFLAGS += -DPA_USE_COREAUDIO=1
-export CFLAGS += @ac_pa_cflags@
-endif
-
-#
-#
-# PortAudio on Win32 (WMME)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_win32)
-export PORTAUDIO_OBJS += pa_win_hostapis.o pa_win_util.o \
-		       pa_win_wmme.o
-export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS
-endif
-
-
-###############################################################################
-# Gather all flags.
-#
-export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
-		   $(CFLAGS) $(CC_INC). $(CC_INC)src 
-export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
-		   $(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
-		   $(LDFLAGS) 
-
-###############################################################################
-# Defines for building PORTAUDIO library
-#
-export PORTAUDIO_SRCDIR = src
-export PORTAUDIO_OBJS += 
-export PORTAUDIO_CFLAGS += $(_CFLAGS)
-
-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.
-#
-TARGETS := libportaudio
-
-all: $(TARGETS)
-
-dep: depend
-distclean: realclean
-
-.PHONY: dep depend libportaudio clean realclean distclean
-
-libportaudio:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $(PORTAUDIO_LIB)
-
-clean:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-
-realclean:
-	$(subst @@,$(subst /,$(HOST_PSEP),.libportaudio-$(TARGET_NAME).depend),$(HOST_RMR))
-	
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-
-depend:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-	echo '$(PORTAUDIO_LIB): .libportaudio-$(TARGET_NAME).depend' >> .libportaudio-$(TARGET_NAME).depend; \
-
Index: pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in	(revision 1202)
@@ -0,0 +1,73 @@
+# @configure_input@
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#
+# There are other values below, but these are handled by PJMEDIA's Makefile
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=@ac_pjmedia_snd@
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=@ac_pa_use_alsa@
+
+# Additional PortAudio CFLAGS are in @ac_pa_cflags@
+
+
+#
+# PortAudio on Unix
+#
+ifeq ($(AC_PJMEDIA_SND),pa_unix)
+# Host APIs and utils
+export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
+
+# Include ALSA?
+ifeq ($(AC_PA_USE_ALSA),1)
+export CFLAGS += -DPA_USE_ALSA=1
+export PORTAUDIO_OBJS += pa_linux_alsa.o
+endif
+
+export CFLAGS += -DPA_USE_OSS=1
+export CFLAGS += @ac_pa_cflags@
+export PORTAUDIO_OBJS += pa_unix_oss.o
+endif
+
+
+#
+# PortAudio on MacOS X (using current PortAudio)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
+export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
+			pa_unix_util.o \
+			pa_mac_core.o \
+			pa_mac_core_blocking.o \
+			pa_mac_core_utilities.o \
+			pa_ringbuffer.o
+export CFLAGS += -DPA_USE_COREAUDIO=1
+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 PORTAUDIO_OBJS +=pa_mac_hostapis.o \
+			pa_unix_util.o \
+			pa_mac_core_old.o 
+export CFLAGS += -DPA_USE_COREAUDIO=1
+export CFLAGS += @ac_pa_cflags@
+endif
+
+#
+#
+# PortAudio on Win32 (WMME)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_win32)
+export PORTAUDIO_OBJS += pa_win_hostapis.o pa_win_util.o \
+		       pa_win_wmme.o
+export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS
+endif
Index: pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak	(revision 1202)
+++ pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak	(revision 1202)
@@ -0,0 +1,34 @@
+# @configure_input@
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#
+# There are other values below, but these are handled by PJMEDIA's Makefile
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=pa_unix
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=0
+
+#
+# PortAudio on Unix
+#
+ifeq ($(AC_PJMEDIA_SND),pa_unix)
+# Host APIs and utils
+export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
+
+# Include ALSA?
+ifeq ($(AC_PA_USE_ALSA),1)
+export CFLAGS += -DPA_USE_ALSA=1
+export PORTAUDIO_OBJS += pa_linux_alsa.o
+endif
+
+export CFLAGS += -DPA_USE_OSS=1 -DHAVE_SYS_SOUNDCARD_H
+export PORTAUDIO_OBJS += pa_unix_oss.o
+endif
+
