Changeset 1352


Ignore:
Timestamp:
Jun 8, 2007 1:41:25 AM (12 years ago)
Author:
bennylp
Message:

Updated the footprint generation script to include PJNATH

Location:
pjproject/trunk/pjsip-apps
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/build/Footprint.mak

    r825 r1352  
    33# to get the footprint report for PJSIP/PJMEDIA. 
    44# 
     5include ../../build.mak 
    56include ../../build/common.mak 
    6  
    7 PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT) 
    8 PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT) 
    9 PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT) 
    10 PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT) 
    11 PJSIP_LIB:=../../pjsip/lib/libpjsip-$(TARGET_NAME)$(LIBEXT) 
    12 PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT) 
    13 PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT) 
    14 PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(TARGET_NAME)$(LIBEXT) 
    157 
    168 
     
    1810# Gather all flags. 
    1911# 
    20 export _CFLAGS  := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \ 
    21                    $(CFLAGS) $(CC_INC)../../pjsip/include \ 
    22                    $(CC_INC)../../pjlib/include \ 
    23                    $(CC_INC)../../pjlib-util/include \ 
    24                    $(CC_INC)../../pjmedia/include 
    25 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 
    26                    $(HOST_CXXFLAGS) $(CXXFLAGS) 
     12export _CFLAGS  := $(APP_CFLAGS) $(CFLAGS) 
     13export _CXXFLAGS:= $(_CFLAGS) 
    2714 
    28 export LIBS :=  $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \ 
    29                 $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \ 
    30                 $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \ 
    31                 $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \ 
    32                 $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \ 
    33                 $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \ 
    34                 $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \ 
    35                 $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) 
    36  
    37  
    38 export _LDFLAGS := $(LIBS) \ 
    39                    $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 
    40                    $(LDFLAGS) -lm 
    41  
    42  
     15export _LDFLAGS := $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS) 
    4316 
    4417EXE := footprint.exe 
    4518 
    4619all:  
    47         $(CROSS_COMPILE)$(CC_NAME) -o $(EXE) ../src/samples/footprint.c $(FCFLAGS) $(_CFLAGS) $(_LDFLAGS) 
     20        $(APP_CC) -o $(EXE) ../src/samples/footprint.c $(FCFLAGS) $(_CFLAGS) $(_LDFLAGS) 
    4821        $(CROSS_COMPILE)strip --strip-all $(EXE) 
    4922 
  • pjproject/trunk/pjsip-apps/build/Samples.mak

    r1201 r1352  
    66# Gather all flags. 
    77# 
    8 export _CFLAGS  := $(PJ_CFLAGS) 
     8export _CFLAGS  := $(PJ_CFLAGS) $(CFLAGS) 
    99export _CXXFLAGS:= $(PJ_CXXFLAGS) 
    10 export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) 
     10export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS) 
    1111 
    1212SRCDIR := ../src/samples 
  • pjproject/trunk/pjsip-apps/build/get-footprint.py

    r826 r1352  
    4545    ['HAS_PJLIB_DNS',           'PJLIB-UTIL DNS packet and parsing'], 
    4646    ['HAS_PJLIB_RESOLVER',      'PJLIB-UTIL Asynchronous DNS resolver/caching engine'], 
     47    ['HAS_PJLIB_CRC32',         'PJLIB-UTIL CRC32 algorithm'], 
     48    ['HAS_PJLIB_HMAC_MD5',      'PJLIB-UTIL HMAC-MD5 algorithm'], 
     49    ['HAS_PJLIB_HMAC_SHA1',     'PJLIB-UTIL HMAC-SHA1 algorithm'], 
    4750 
    4851    # PJSIP 
     
    5457    
    5558    ['HAS_PJSIP_TCP_TRANSPORT', 'PJSIP TCP transport'], 
     59    ['HAS_PJSIP_TLS_TRANSPORT', 'PJSIP TLS transport'], 
    5660    ['HAS_PJSIP_INFO',          'PJSIP INFO support (RFC 2976) (no special treatment, thus the zero size)'], 
    5761    ['HAS_PJSIP_TRANSACTION',   'PJSIP transaction and stateful API'], 
     
    7680    ['',                        'Subtotal: Complete PJSIP package (call, registration, presence, IM) +STUN +GETOPT (+PJLIB), no media'], 
    7781     
     82    # PJNATH 
     83    ['HAS_PJNATH_STUN',         'PJNATH STUN'], 
     84    ['HAS_PJNATH_ICE',          'PJNATH ICE'], 
     85 
    7886    # PJMEDIA 
    7987    ['HAS_PJMEDIA_EC',          'PJMEDIA accoustic echo cancellation'], 
     
    97105    ['HAS_PJMEDIA_MEM_PLAYER',  'PJMEDIA fixed buffer player'], 
    98106    ['HAS_PJMEDIA_MEM_CAPTURE', 'PJMEDIA fixed buffer writer'], 
     107    ['HAS_PJMEDIA_ICE',         'PJMEDIA ICE transport'], 
    99108 
    100109    # Subtotal 
  • pjproject/trunk/pjsip-apps/src/samples/footprint.c

    r974 r1352  
    3333#include <pjlib-util.h> 
    3434#include <pjlib.h> 
     35#include <pjnath.h> 
    3536#include <stdlib.h> 
    3637 
     
    4546#define HAS_PJLIB_DNS 
    4647#define HAS_PJLIB_RESOLVER 
     48#define HAS_PJLIB_SRV_RESOLVER 
     49 
     50#define HAS_PJLIB_CRC32 
     51#define HAS_PJLIB_HMAC_MD5 
     52#define HAS_PJLIB_HMAC_SHA1 
    4753 
    4854#define HAS_PJSIP_CORE_MSG_ELEM 
     
    5258#define HAS_PJSIP_UDP_TRANSPORT 
    5359#define HAS_PJSIP_TCP_TRANSPORT 
     60#define HAS_PJSIP_TLS_TRANSPORT 
    5461#define HAS_PJSIP_TRANSACTION 
    5562#define HAS_PJSIP_UA_LAYER 
     
    6370#define HAS_PJSIP_PRESENCE 
    6471#define HAS_PJSIP_IS_COMPOSING 
     72 
     73#define HAS_PJNATH_STUN 
     74#define HAS_PJNATH_ICE 
    6575 
    6676#define HAS_PJMEDIA 
     
    8393#define HAS_PJMEDIA_MEM_PLAYER 
    8494#define HAS_PJMEDIA_MEM_CAPTURE 
     95#define HAS_PJMEDIA_ICE 
    8596 
    8697#define HAS_PJMEDIA_G711_CODEC 
     
    113124 
    114125#ifdef HAS_PJLIB_STUN 
    115     pj_stun_get_mapped_addr(&cp.factory, 0, NULL, NULL, 80, NULL, 80, NULL); 
     126    pjstun_get_mapped_addr(&cp.factory, 0, NULL, NULL, 80, NULL, 80, NULL); 
    116127#endif 
    117128 
     
    162173    pj_dns_make_query(NULL, NULL, 0, 0, NULL); 
    163174    pj_dns_parse_packet(NULL, NULL, 0, NULL); 
    164     pj_dns_packet_dup(NULL, NULL, NULL); 
     175    pj_dns_packet_dup(NULL, NULL, 0, NULL); 
    165176#endif 
    166177 
     
    173184    pj_dns_resolver_cancel_query(NULL, 0); 
    174185    pj_dns_resolver_add_entry(NULL, NULL, 0); 
     186#endif 
     187 
     188#ifdef HAS_PJLIB_SRV_RESOLVER 
     189    pj_dns_srv_resolve(NULL, NULL, 0, NULL, NULL, PJ_FALSE, NULL, NULL); 
     190#endif 
     191 
     192#ifdef HAS_PJLIB_CRC32 
     193    pj_crc32_init(NULL); 
     194    pj_crc32_update(NULL, NULL, 0); 
     195    pj_crc32_final(NULL); 
     196#endif 
     197 
     198#ifdef HAS_PJLIB_HMAC_MD5 
     199    pj_hmac_md5(NULL, 0, NULL, 0, NULL); 
     200#endif 
     201 
     202#ifdef HAS_PJLIB_HMAC_SHA1 
     203    pj_hmac_sha1(NULL, 0, NULL, 0, NULL); 
     204#endif 
     205 
     206#ifdef HAS_PJNATH_STUN 
     207    pj_stun_session_create(NULL, NULL, NULL, PJ_FALSE, NULL); 
     208    pj_stun_session_destroy(NULL); 
     209    pj_stun_session_set_credential(NULL, NULL); 
     210    pj_stun_session_create_req(NULL, 0, NULL, NULL); 
     211    pj_stun_session_create_ind(NULL, 0, NULL); 
     212    pj_stun_session_create_res(NULL, NULL, 0, NULL, NULL); 
     213    pj_stun_session_send_msg(NULL, PJ_FALSE, NULL, 0, NULL); 
     214#endif 
     215 
     216#ifdef HAS_PJNATH_ICE 
     217    pj_ice_strans_create(NULL, NULL, 0, NULL, NULL, NULL); 
     218    pj_ice_strans_set_stun_domain(NULL, NULL, NULL); 
     219    pj_ice_strans_create_comp(NULL, 0, 0, NULL); 
     220    pj_ice_strans_add_cand(NULL, 0, PJ_ICE_CAND_TYPE_HOST, 0, NULL, PJ_FALSE); 
     221    pj_ice_strans_init_ice(NULL, PJ_ICE_SESS_ROLE_CONTROLLED, NULL, NULL); 
     222    pj_ice_strans_start_ice(NULL, NULL, NULL, 0, NULL); 
     223    pj_ice_strans_stop_ice(NULL); 
     224    pj_ice_strans_sendto(NULL, 0, NULL, 0, NULL, 0); 
    175225#endif 
    176226 
     
    233283    pjsip_endpt_create_ack(NULL, NULL, NULL, NULL); 
    234284    pjsip_endpt_create_cancel(NULL, NULL, NULL); 
    235     pjsip_get_request_addr(NULL, NULL); 
     285    pjsip_get_request_dest(NULL, NULL); 
    236286    pjsip_endpt_send_request_stateless(NULL, NULL, NULL, NULL); 
    237287    pjsip_get_response_addr(NULL, NULL, NULL); 
     
    246296#ifdef HAS_PJSIP_TCP_TRANSPORT 
    247297    pjsip_tcp_transport_start(NULL, NULL, 1, NULL); 
     298#endif 
     299 
     300#ifdef HAS_PJSIP_TLS_TRANSPORT 
     301    pjsip_tls_transport_start(NULL, NULL, NULL, NULL, 0, NULL); 
    248302#endif 
    249303 
     
    430484 
    431485#ifdef HAS_PJMEDIA_RESAMPLE 
    432     pjmedia_resample_create(NULL, PJ_TRUE, PJ_TRUE, 0, 0, 0, NULL); 
     486    pjmedia_resample_create(NULL, PJ_TRUE, PJ_TRUE, 0, 0, 0, 0, NULL); 
    433487    pjmedia_resample_run(NULL, NULL, NULL); 
    434488#endif 
     
    550604#endif 
    551605 
     606#ifdef HAS_PJMEDIA_ICE 
     607    pjmedia_ice_create(NULL, NULL, 0, NULL, NULL); 
     608    pjmedia_ice_destroy(NULL); 
     609    pjmedia_ice_start_init(NULL, 0, NULL, NULL, NULL); 
     610    pjmedia_ice_init_ice(NULL, PJ_ICE_SESS_ROLE_CONTROLLED, NULL, NULL); 
     611    pjmedia_ice_modify_sdp(NULL, NULL, NULL); 
     612    pjmedia_ice_start_ice(NULL, NULL, NULL, 0); 
     613    pjmedia_ice_stop_ice(NULL); 
     614#endif 
     615 
    552616#ifdef HAS_PJMEDIA_G711_CODEC 
    553617    pjmedia_codec_g711_init(NULL); 
Note: See TracChangeset for help on using the changeset viewer.