Index: pjproject/branches/split-3rd-party/third_party/build/gsm/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/gsm/Makefile	(revision 1180)
+++ pjproject/branches/split-3rd-party/third_party/build/gsm/Makefile	(revision 1180)
@@ -0,0 +1,65 @@
+include ../../../build.mak
+include ../../../build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export GSM_CODEC_LIB := ../../lib/libgsmcodec-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)../../gsm/inc \
+		   $(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) \
+		   $(LDFLAGS) 
+
+export GSM_CODEC_SRCDIR = ../../gsm/src
+export GSM_CODEC_OBJS = add.o code.o decode.o \
+                	gsm_create.o gsm_decode.o gsm_destroy.o \
+                	gsm_encode.o gsm_explode.o gsm_implode.o \
+                	gsm_option.o long_term.o \
+                	lpc.o preprocess.o rpe.o short_term.o \
+                	table.o
+
+export GSM_CODEC_CFLAGS = -DSASR -DWAV49 -DNeedFunctionPrototypes=1 $(_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 := libgsmcodec
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libgsmcodec clean realclean distclean
+
+libgsmcodec:
+	$(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $(GSM_CODEC_LIB)
+
+clean print_lib:
+	$(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=GSM_CODEC app=libgsmcodec $@
+	echo '$(GSM_CODEC_LIB): .libgsmcodec-$(TARGET_NAME).depend' >> .libgsmcodec-$(TARGET_NAME).depend; \
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/ilbc/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/ilbc/Makefile	(revision 1180)
+++ pjproject/branches/split-3rd-party/third_party/build/ilbc/Makefile	(revision 1180)
@@ -0,0 +1,66 @@
+include ../../../build.mak
+include ../../../build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export ILBC_LIB := ../../lib/libilbccodec-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)../../ilbc \
+		   $(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) \
+		   $(LDFLAGS) 
+
+export ILBC_SRCDIR = ../../ilbc
+export ILBC_OBJS = FrameClassify.o LPCdecode.o LPCencode.o \
+		   StateConstructW.o StateSearchW.o anaFilter.o \
+		   constants.o createCB.o doCPLC.o \
+		   enhancer.o filter.o gainquant.o \
+		   getCBvec.o helpfun.o hpInput.o \
+		   hpOutput.o iCBConstruct.o iCBSearch.o \
+		   iLBC_decode.o iLBC_encode.o lsf.o \
+		   packing.o syntFilter.o
+export ILBC_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 := libilbccodec
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libilbccodec clean realclean distclean
+
+libilbccodec:
+	$(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $(ILBC_LIB)
+
+clean print_lib:
+	$(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=ILBC app=libilbccodec $@
+	echo '$(ILBC_LIB): .libilbccodec-$(TARGET_NAME).depend' >> .libilbccodec-$(TARGET_NAME).depend; \
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/resample/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/resample/Makefile	(revision 1180)
+++ pjproject/branches/split-3rd-party/third_party/build/resample/Makefile	(revision 1180)
@@ -0,0 +1,59 @@
+include ../../../build.mak
+include ../../../build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export RESAMPLE_LIB := ../../lib/libresample-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)../../resample/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) \
+		   $(LDFLAGS) 
+
+export RESAMPLE_SRCDIR = ../../resample/src
+export RESAMPLE_OBJS = resamplesubs.o
+export RESAMPLE_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 := libresample
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libresample clean realclean distclean
+
+libresample:
+	$(MAKE) -f $(RULES_MAK) APP=RESAMPLE app=libresample $(RESAMPLE_LIB)
+
+clean print_lib:
+	$(MAKE) -f $(RULES_MAK) APP=RESAMPLE app=libresample $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=RESAMPLE app=libresample $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=RESAMPLE app=libresample $@
+	echo '$(RESAMPLE_LIB): .libresample-$(TARGET_NAME).depend' >> .libresample-$(TARGET_NAME).depend; \
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/speex/Makefile
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/speex/Makefile	(revision 1180)
+++ pjproject/branches/split-3rd-party/third_party/build/speex/Makefile	(revision 1180)
@@ -0,0 +1,74 @@
+include ../../../build.mak
+include ../../../build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export SPEEX_LIB := ../../lib/libspeex-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)../../speex/include \
+		   $(CC_INC)../../speex/libspeex \
+		   $(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) \
+		   $(LDFLAGS) 
+
+export SPEEX_SRCDIR = ../../speex/libspeex
+export SPEEX_OBJS = 	bits.o cb_search.o exc_10_16_table.o  \
+			exc_10_32_table.o exc_20_32_table.o \
+			exc_5_256_table.o exc_5_64_table.o \
+			exc_8_128_table.o fftwrap.o filterbank.o \
+			filters.o gain_table.o gain_table_lbr.o \
+			hexc_10_32_table.o hexc_table.o \
+			high_lsp_tables.o jitter.o \
+			kiss_fft.o kiss_fftr.o lpc.o \
+			lsp.o lsp_tables_nb.o ltp.o \
+			math_approx.o mdf.o medfilter.o misc.o modes.o \
+			nb_celp.o preprocess.o \
+			quant_lsp.o resample.o sb_celp.o smallft.o \
+			speex.o speex_callbacks.o speex_header.o \
+			stereo.o vbr.o vq.o window.o
+
+export SPEEX_CFLAGS = -DHAVE_CONFIG_H $(_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 := libspeex
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libspeex clean realclean distclean
+
+libspeex:
+	$(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $(SPEEX_LIB)
+
+clean print_lib:
+	$(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@
+	echo '$(SPEEX_LIB): .libspeex-$(TARGET_NAME).depend' >> .libspeex-$(TARGET_NAME).depend; \
+
+
Index: pjproject/branches/split-3rd-party/third_party/build/speex/config.h
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/speex/config.h	(revision 1179)
+++ pjproject/branches/split-3rd-party/third_party/build/speex/config.h	(revision 1180)
@@ -1,3 +1,3 @@
-#include <pj/config.h>
+#include <pj/types.h>
 
 /* Check if we need to use the fixed point version */
@@ -10,4 +10,8 @@
     (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0) 
 #   include "../../speex/win32/config.h"
+#else
+#define inline __inline
+#define restrict
+#include "misc.h"
 #endif
 
Index: pjproject/branches/split-3rd-party/third_party/build/speex/speex/speex_config_types.h
===================================================================
--- pjproject/branches/split-3rd-party/third_party/build/speex/speex/speex_config_types.h	(revision 1180)
+++ pjproject/branches/split-3rd-party/third_party/build/speex/speex/speex_config_types.h	(revision 1180)
@@ -0,0 +1,6 @@
+#include <pj/types.h>
+typedef pj_int16_t	spx_int16_t;
+typedef pj_uint16_t	spx_uint16_t;
+typedef pj_int32_t	spx_int32_t;
+typedef pj_uint32_t	spx_uint32_t;
+
Index: pjproject/branches/split-3rd-party/third_party/gsm/inc/config.h
===================================================================
--- pjproject/branches/split-3rd-party/third_party/gsm/inc/config.h	(revision 1179)
+++ pjproject/branches/split-3rd-party/third_party/gsm/inc/config.h	(revision 1180)
@@ -10,6 +10,6 @@
 #define	CONFIG_H
 
-/*efine	SIGHANDLER_T	int 		/* signal handlers are void	*/
-/*efine HAS_SYSV_SIGNAL	1		/* sigs not blocked/reset?	*/
+/*efine	SIGHANDLER_T	int 		* signal handlers are void	*/
+/*efine HAS_SYSV_SIGNAL	1		* sigs not blocked/reset?	*/
 
 #define	HAS_STDLIB_H	1		/* /usr/include/stdlib.h	*/
@@ -23,15 +23,15 @@
 #define	HAS_FCHOWN 	1		/* fchown syscall		*/
 #define	HAS_CHOWN 	1		/* chown syscall		*/
-/*efine	HAS__FSETMODE 	1		/* _fsetmode -- set file mode	*/
+/*efine	HAS__FSETMODE 	1		* _fsetmode -- set file mode	*/
 
 #define	HAS_STRING_H 	1		/* /usr/include/string.h 	*/
-/*efine	HAS_STRINGS_H	1		/* /usr/include/strings.h 	*/
+/*efine	HAS_STRINGS_H	1		* /usr/include/strings.h 	*/
 
 #define	HAS_UNISTD_H	1		/* /usr/include/unistd.h	*/
 #define	HAS_UTIME	1		/* POSIX utime(path, times)	*/
-/*efine	HAS_UTIMES	1		/* use utimes()	syscall instead	*/
+/*efine	HAS_UTIMES	1		* use utimes()	syscall instead	*/
 #define	HAS_UTIME_H	1		/* UTIME header file		*/
 #define	HAS_UTIMBUF	1		/* struct utimbuf		*/
-/*efine	HAS_UTIMEUSEC   1		/* microseconds in utimbuf?	*/
+/*efine	HAS_UTIMEUSEC   1		* microseconds in utimbuf?	*/
 
 #endif	/* CONFIG_H */
