Changeset 604 for pjproject/trunk


Ignore:
Timestamp:
Jul 14, 2006 3:20:00 PM (18 years ago)
Author:
bennylp
Message:

Attempt to get some applications linked for RTEMS target, just to get the footprint calculation working

Location:
pjproject/trunk
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/build/Makefile

    r477 r604  
     1# By default, the test application includes main.o. 
     2# OS make file may override this with os-specific files 
     3export UTIL_TEST_OBJS = main.o 
     4 
    15include ../../build/common.mak 
    26 
     
    3135# 
    3236export UTIL_TEST_SRCDIR = ../src/pjlib-util-test 
    33 export UTIL_TEST_OBJS += xml.o test.o main.o 
     37export UTIL_TEST_OBJS += xml.o test.o  
    3438export UTIL_TEST_CFLAGS += $(_CFLAGS) 
    3539export UTIL_TEST_LDFLAGS += $(_LDFLAGS) 
  • pjproject/trunk/pjlib/include/pj/compat/setjmp.h

    r65 r604  
    2828#  include <setjmp.h> 
    2929   typedef jmp_buf pj_jmp_buf; 
    30 #  define pj_setjmp(buf)        setjmp(buf) 
    31 #  define pj_longjmp(buf,d)     longjmp(buf,d) 
     30#  ifndef pj_setjmp 
     31#    define pj_setjmp(buf)      setjmp(buf) 
     32#  endif 
     33#  ifndef pj_longjmp 
     34#    define pj_longjmp(buf,d)   longjmp(buf,d) 
     35#  endif 
    3236 
    3337#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0 && \ 
  • pjproject/trunk/pjmedia/build/os-rtems.mak

    r433 r604  
    33# 
    44 
     5export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND 
    56export PJMEDIA_OBJS += nullsound.o 
    67export SOUND_OBJS = $(NULLSOUND_OBJS) 
  • pjproject/trunk/pjsip-apps/build/Footprint.mak

    r586 r604  
    4545 
    4646all:  
    47         $(CC_NAME) -o $(EXE) ../src/samples/footprint.c $(FCFLAGS) $(_CFLAGS) $(_LDFLAGS) 
     47        $(CROSS_COMPILE)$(CC_NAME) -o $(EXE) ../src/samples/footprint.c $(FCFLAGS) $(_CFLAGS) $(_LDFLAGS) 
     48        $(CROSS_COMPILE)strip --strip-all $(EXE) 
    4849 
    4950clean: 
     
    5152 
    5253print_name: 
    53         @echo $(MACHINE_NAME) $(OS_NAME) $(CC_NAME) `$(CC_NAME) -dumpversion` 
     54        @echo $(MACHINE_NAME) $(OS_NAME) $(CROSS_COMPILE)$(CC_NAME) `$(CROSS_COMPILE)$(CC_NAME) -dumpversion` 
     55 
  • pjproject/trunk/pjsip-apps/build/get-footprint.py

    r591 r604  
    3333    ['',                        'Subtotal: empty application size on this platform'], 
    3434 
    35     ['HAS_PJLIB',               'PJLIB (pool, data structures, hash tables, ioqueue, socket, timer heap, etc.)'], 
    36     ['',                        'Subtotal: Minimal PJLIB application size'], 
     35    ['HAS_PJLIB',               'PJLIB (pool, data structures, hash tables, ioqueue, socket, timer heap, etc.). ' + 
     36                                'For targets that statically link application with LIBC, the size includes ' + 
     37                                'various LIBC functions that are used by PJLIB.'], 
     38    ['',                        'Subtotal: Application linked with PJLIB'], 
    3739 
    3840    # PJLIB-UTIL 
     
    4749    ['HAS_PJSIP_CORE_MSG_UTIL', 'PJSIP Core - Stateless operations, server resolution and fail-over'], 
    4850    ['HAS_PJSIP_UDP_TRANSPORT', 'PJSIP UDP transport'], 
    49     ['',                        'Subtotal: A very minimum SIP application (parsing, UDP transport+STUN, no transaction)'], 
     51    ['',                        'Subtotal: A minimalistic SIP application (parsing, UDP transport+STUN, no transaction)'], 
    5052    
    5153    ['HAS_PJSIP_TCP_TRANSPORT', 'PJSIP TCP transport'], 
     
    158160# Write the report to HTML file 
    159161# 
    160 def print_html_report(filename): 
    161     output = open(filename, 'w') 
     162def print_html_report(): 
    162163 
    163164    # Get Revision info. 
     
    172173    cc = names[2] 
    173174    cc_ver = names[3] 
    174          
     175 
     176    # Open HTML file 
     177    filename = 'footprint-' + m + '-' + o + '.htm' 
     178    output = open(filename, 'w') 
     179 
     180    title = 'PJSIP and PJMEDIA footprint report for ' + m + '-' + o + ' target' 
    175181    output.write('<HTML><HEAD>\n'); 
    176     output.write(' <TITLE>PJSIP and PJMEDIA footprint report for ' + o + '/' + m + ' (r' + revision + ')</TITLE>\n') 
     182    output.write(' <TITLE>' + title + '</TITLE>\n') 
    177183    output.write(' <LINK href="/style/style.css" type="text/css" rel="stylesheet">\n') 
    178184    output.write('</HEAD>\n'); 
     
    180186    output.write('<!--#include virtual="/header.html" -->') 
    181187 
    182     output.write(' <H1>PJSIP and PJMEDIA footprint report (r' + revision + ')</H1>\n') 
    183     output.write('Auto-generated by pjsip-apps/build/get-footprint.py\n') 
     188    output.write(' <H1>' + title + '</H1>\n') 
     189    output.write('Auto-generated by pjsip-apps/build/get-footprint.py script\n') 
    184190    output.write('<p>Date: ' + time.asctime() + '<BR>\n') 
    185191    output.write('Revision: r' + revision + '</p>\n\n') 
     
    243249            output.write( '  <TD>' + e[5] + '</TD>\n') 
    244250        else: 
     251            empty_size = exe_size[1] 
    245252            output.write('<TR bgcolor="#e8e8ff">\n') 
    246253            output.write( '  <TD align="right">&nbsp;</TD>\n') 
    247254            output.write( '  <TD align="right">&nbsp;</TD>\n') 
    248255            output.write( '  <TD align="right">&nbsp;</TD>\n') 
    249             output.write( '  <TD><strong>' + e[5] + ': .text=' + e[2]+ ', .data=' + e[3] + ', .bss=' + e[4] + '</strong></TD>\n') 
     256            output.write( '  <TD><strong>' + e[5] + ': .text=' + e[2]+ ', .data=' + e[3] + ', .bss=' + e[4] ) 
     257            output.write( '\n </strong> <BR>(Size minus empty application size: ' + \ 
     258                            '.text=' + `string.atoi(e[2]) - string.atoi(empty_size[2])` + \ 
     259                            ', .data=' + `string.atoi(e[3]) - string.atoi(empty_size[3])` + \ 
     260                            ', .data=' + `string.atoi(e[4]) - string.atoi(empty_size[4])` + \ 
     261                            ')\n' ) 
     262            output.write( ' </TD>\n') 
    250263 
    251264        output.write('</TR>\n') 
     
    307320         
    308321 
    309 print_text_report('footprint.txt')       
    310 print_html_report('footprint.htm') 
    311  
     322#print_text_report('footprint.txt')      
     323print_html_report() 
     324 
  • pjproject/trunk/pjsip-apps/src/samples/footprint.c

    r591 r604  
    530530 
    531531 
    532 int main() 
     532int test_main() 
    533533{ 
    534534    return dummy_function(); 
    535535} 
    536536 
     537#if defined(PJ_RTEMS) && PJ_RTEMS!=0 
     538#  include "../../pjlib/src/pjlib-test/main_rtems.c" 
     539#else 
     540int main() 
     541{ 
     542  return test_main(); 
     543} 
     544#endif 
     545 
  • pjproject/trunk/pjsip/build/Makefile

    r563 r604  
     1# For common OSes, test's main() is defined in main.c. 
     2# OS specific configuration may want to put it in different file. 
     3# For example, see os-rtems.mak in current directory. 
     4export TEST_OBJS = main.o 
     5 
    16include ../../build/common.mak 
    27 
     
    8893                    tsx_basic_test.o tsx_bench.o tsx_uac_test.o \ 
    8994                    tsx_uas_test.o txdata_test.o uri_test.o 
    90 export TEST_OBJS += main.o 
    9195export TEST_CFLAGS += $(_CFLAGS) 
    9296export TEST_LDFLAGS += $(_LDFLAGS) 
Note: See TracChangeset for help on using the changeset viewer.