From 032f5c4def19123a1c52d54691579dd6167543b9 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 9 Apr 2007 17:13:10 +0000 Subject: Initial Makefiles for the third_party components git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/split-3rd-party@1180 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/build/gsm/Makefile | 65 +++++++++++++++++++ third_party/build/ilbc/Makefile | 66 +++++++++++++++++++ third_party/build/resample/Makefile | 59 +++++++++++++++++ third_party/build/speex/Makefile | 74 ++++++++++++++++++++++ third_party/build/speex/config.h | 6 +- third_party/build/speex/speex/speex_config_types.h | 6 ++ third_party/gsm/inc/config.h | 12 ++-- 7 files changed, 281 insertions(+), 7 deletions(-) create mode 100644 third_party/build/gsm/Makefile create mode 100644 third_party/build/ilbc/Makefile create mode 100644 third_party/build/resample/Makefile create mode 100644 third_party/build/speex/Makefile create mode 100644 third_party/build/speex/speex/speex_config_types.h (limited to 'third_party') diff --git a/third_party/build/gsm/Makefile b/third_party/build/gsm/Makefile new file mode 100644 index 00000000..c469f57e --- /dev/null +++ b/third_party/build/gsm/Makefile @@ -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; \ + + diff --git a/third_party/build/ilbc/Makefile b/third_party/build/ilbc/Makefile new file mode 100644 index 00000000..f85ce629 --- /dev/null +++ b/third_party/build/ilbc/Makefile @@ -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; \ + + diff --git a/third_party/build/resample/Makefile b/third_party/build/resample/Makefile new file mode 100644 index 00000000..6d444053 --- /dev/null +++ b/third_party/build/resample/Makefile @@ -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; \ + + diff --git a/third_party/build/speex/Makefile b/third_party/build/speex/Makefile new file mode 100644 index 00000000..234e2b93 --- /dev/null +++ b/third_party/build/speex/Makefile @@ -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; \ + + diff --git a/third_party/build/speex/config.h b/third_party/build/speex/config.h index 7874c3f7..89fd3400 100644 --- a/third_party/build/speex/config.h +++ b/third_party/build/speex/config.h @@ -1,4 +1,4 @@ -#include +#include /* Check if we need to use the fixed point version */ #if !defined(PJ_HAS_FLOATING_POINT) || PJ_HAS_FLOATING_POINT==0 @@ -9,6 +9,10 @@ #if (defined(PJ_WIN32) && PJ_WIN32!=0) || \ (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0) # include "../../speex/win32/config.h" +#else +#define inline __inline +#define restrict +#include "misc.h" #endif #ifdef _MSC_VER diff --git a/third_party/build/speex/speex/speex_config_types.h b/third_party/build/speex/speex/speex_config_types.h new file mode 100644 index 00000000..b4054516 --- /dev/null +++ b/third_party/build/speex/speex/speex_config_types.h @@ -0,0 +1,6 @@ +#include +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; + diff --git a/third_party/gsm/inc/config.h b/third_party/gsm/inc/config.h index dfb1eadb..ab360123 100644 --- a/third_party/gsm/inc/config.h +++ b/third_party/gsm/inc/config.h @@ -9,8 +9,8 @@ #ifndef CONFIG_H #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 */ #define HAS_LIMITS_H 1 /* /usr/include/limits.h */ @@ -22,16 +22,16 @@ #define HAS_CHMOD 1 /* chmod syscall */ #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 */ -- cgit v1.2.3