Updated mingw compilation

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@241 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2006-02-27 00:40:31 +00:00
parent 2eb5dd62f0
commit ab7399b050
6 changed files with 46 additions and 26 deletions

View File

@ -29,9 +29,10 @@ export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
PA_DIR:=portaudio
export PJMEDIA_SRCDIR = ../src/pjmedia
export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
codec.o endpoint.o errno.o g711.o jbuf.o rtcp.o \
rtp.o sdp.o sdp_cmp.o sdp_neg.o session.o stream.o \
pasound.o \
codec.o conference.o endpoint.o errno.o file_port.o \
g711.o jbuf.o pasound.o port.o rtcp.o \
rtp.o sdp.o sdp_cmp.o sdp_neg.o session.o silencedet.o \
stream.o \
$(PA_DIR)/pa_allocation.o \
$(PA_DIR)/pa_converters.o \
$(PA_DIR)/pa_cpuload.o \
@ -51,10 +52,10 @@ export PJMEDIA_CFLAGS += $(_CFLAGS)
export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec
export PJMEDIA_CODEC_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
gsm.o pjmedia-codec-lib.o \
gsm/add.o gsm/code.o gsm/debug.o gsm/decode.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/gsm_print.o gsm/long_term.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
export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS)

View File

@ -9,30 +9,30 @@
#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 */
/*efine HAS_LIMITS_H 1 //* /usr/include/limits.h */
/*efine HAS_LIMITS_H 1 // * /usr/include/limits.h */
#define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */
/*efine HAS_ERRNO_DECL 1 //* errno.h declares errno */
/*efine HAS_ERRNO_DECL 1 // * errno.h declares errno */
#define HAS_FSTAT 1 /* fstat syscall */
#define HAS_FCHMOD 1 /* fchmod syscall */
#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 */
/*efine HAS_UTIMBUF 1 //* struct utimbuf */
/*efine HAS_UTIMEUSEC 1 //* microseconds in utimbuf? */
/*efine HAS_UTIMBUF 1 // * struct utimbuf */
/*efine HAS_UTIMEUSEC 1 // * microseconds in utimbuf? */
#endif /* CONFIG_H */

View File

@ -43,7 +43,6 @@ static pj_status_t file_put_frame(pjmedia_port *this_port,
static pj_status_t file_get_frame(pjmedia_port *this_port,
pjmedia_frame *frame);
static pj_status_t file_on_destroy(pjmedia_port *this_port);
static pj_status_t read_buffer(struct file_port *port);
static struct file_port *create_file_port(pj_pool_t *pool)
{

View File

@ -10,6 +10,7 @@ PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(MACHINE_NAME)-$(OS_NAME)
export PJSIP_LIB:=../lib/libpjsip-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
export PJSIP_UA_LIB:=../lib/libpjsip-ua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
export PJSIP_SIMPLE_LIB:=../lib/libpjsip-simple-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
export PJSUA_LIB_LIB=../lib/libpjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
###############################################################################
@ -20,7 +21,8 @@ export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CC_INC)../../pjlib-util/include $(CC_INC)../../pjmedia/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
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)) \
@ -49,7 +51,7 @@ export PJSIP_CFLAGS += $(_CFLAGS)
#
export PJSIP_UA_SRCDIR = ../src/pjsip-ua
export PJSIP_UA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
sip_inv.o sip_reg.o
sip_inv.o sip_reg.o sip_xfer.o
export PJSIP_UA_CFLAGS += $(_CFLAGS)
@ -62,13 +64,22 @@ export PJSIP_SIMPLE_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS)
###############################################################################
# Defines for building PJSUA-LIB library
#
export PJSUA_LIB_SRCDIR = ../src/pjsua-lib
export PJSUA_LIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
pjsua_reg.o pjsua_call.o pjsua_pres.o pjsua_opt.o \
pjsua_core.o
export PJSUA_LIB_CFLAGS += $(_CFLAGS)
###############################################################################
# Defines for building PJSUA
#
export PJSUA_SRCDIR = ../src/pjsua
export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
main.o pjsua_reg.o pjsua_inv.o pjsua_pres.o pjsua_opt.o \
pjsua_core.o
main.o
export PJSUA_CFLAGS += $(_CFLAGS)
export PJSUA_LDFLAGS += $(_LDFLAGS)
export PJSUA_EXE:=../bin/pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE)
@ -80,7 +91,7 @@ export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
# Main entry
#
#
TARGETS := pjsip pjsip-ua pjsip-simple pjsua
TARGETS := pjsip pjsip-ua pjsip-simple pjsua-lib pjsua
all: $(TARGETS)
@ -90,7 +101,7 @@ doc:
dep: depend
distclean: realclean
.PHONY: dep depend pjsip pjsip-ua pjsua clean realclean distclean
.PHONY: dep depend pjsip pjsip-ua pjsua-lib pjsua clean realclean distclean
pjsip:
$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(PJSIP_LIB)
@ -101,7 +112,10 @@ pjsip-ua:
pjsip-simple:
$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(PJSIP_SIMPLE_LIB)
pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB)
pjsua-lib:
$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB)
pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB) $(PJSUA_LIB_LIB)
$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $(PJSUA_EXE)
.PHONY: ../lib/pjsip.ko
@ -119,6 +133,11 @@ pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB)
echo Making $@
$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
.PHONY: ../lib/pjsua-lib.ko
../lib/pjsua-lib.ko:
echo Making $@
$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
.PHONY: ../lib/pjsua.ko
../lib/pjsua.ko:
$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
@ -127,9 +146,10 @@ clean depend realclean:
$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@
$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
@if test "$@" == "depend"; then \
echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB)' >> .pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE) $(PJSUA_LIB)' >> .pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
fi

View File

@ -1114,7 +1114,7 @@ static pj_status_t process_answer( pjsip_inv_session *inv,
const pjmedia_sdp_session *local_sdp)
{
pj_status_t status;
pjmedia_sdp_session *sdp = NULL;
const pjmedia_sdp_session *sdp = NULL;
/* If local_sdp is specified, then we MUST NOT have answered the
* offer before.

View File

@ -853,7 +853,7 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv,
len = pj_ansi_sprintf( info+info_len,
", stream #%d: %.*s (%s)", i,
(int)strm_info->fmt.encoding_name.slen,
(int)strm_info->fmt.encoding_name.ptr,
strm_info->fmt.encoding_name.ptr,
dir);
if (len > 0)
info_len += len;