Changes between Version 1 and Version 2 of Getting_Started_Using


Ignore:
Timestamp:
Mar 12, 2007 9:26:56 PM (13 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting_Started_Using

    v1 v2  
    55== Requirements == 
    66 
    7  * This article is only valid with '''version 0.5.10.2''' release or later of the libraries. 
    87 * GNU tools (GNU make, binutils, gcc, and the likes). 
    98 
     
    1312    {{{$ ./configure && make dep && make}}} 
    1413 1. Create a directory outside the PJSIP sources for your project and place your source files there. 
    15  1. Create a file named '''Makefile''' in your source directory with the following content: 
     14 1. Create a file named '''Makefile''' in your source directory. If you have PJ '''version 0.5.10.2''' or later, you can use this template for your Makefile: 
    1615{{{ 
    1716#Modify this to point to the PJSIP location. 
     
    2524CFLAGS  = $(APP_CFLAGS) 
    2625CPPFLAGS= ${APP_CXXFLAGS} 
     26 
     27# If your application is in a file named myapp.cpp or myapp.c 
     28# this is the line you will need to build the binary. 
     29all: myapp 
     30 
     31myapp: myapp.cpp 
     32        $(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $(LDLIBS) $< 
     33 
     34clean: 
     35        rm -f myapp.o myapp 
     36}}} 
     37 1. Otherwise if you have PJ '''version 0.5.10.1''' or older, you can use this template for your Makefile: 
     38{{{ 
     39# Modify this to point to the PJSIP location. 
     40PJBASE=/home/tarani/pjproject-0.5.10.1 
     41 
     42include $(PJBASE)/build/mak 
     43 
     44CC=$(CROSS_COMPILE)$(CC_NAME) 
     45 
     46# Remove components that you don't need from the following definitions. 
     47LDFLAGS=-L${PJBASE}/pjlib/lib\ 
     48    -L${PJBASE}/pjlib-util/lib\ 
     49    -L${PJBASE}/pjmedia/lib\ 
     50    -L${PJBASE}/pjsip/lib 
     51LDLIBS=-lpjsua-${TARGET_NAME}\ 
     52    -lpjsip-ua-${TARGET_NAME}\ 
     53    -lpjsip-simple-${TARGET_NAME}\ 
     54    -lpjsip-${TARGET_NAME}\ 
     55    -lpjmedia-codec-${TARGET_NAME}\ 
     56    -lpjmedia-${TARGET_NAME}\ 
     57    -lpjmedia-codec-${TARGET_NAME}\ 
     58    -lpjlib-util-${TARGET_NAME}\ 
     59    -lpj-${TARGET_NAME}\ 
     60        -lm\ 
     61        -lpthread\ 
     62        -lasound\ 
     63        -lssl 
     64CFLAGS=-I${PJBASE}/pjlib/include\ 
     65    -I${PJBASE}/pjlib-util/include\ 
     66    -I${PJBASE}/pjmedia/include\ 
     67    -I${PJBASE}/pjsip/include\ 
     68    -DPJ_AUTOCONF=1 
     69CPPFLAGS=${CFLAGS} 
    2770 
    2871# If your application is in a file named myapp.cpp or myapp.c