Commit d61c1096 authored by Emmanuel Milou's avatar Emmanuel Milou

[#1212] Create sflphone-common at the root of the repository

parent 63029a25

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
[Last update: 2007/02/18]
-= INTRO=-
This top level projects:
- pjlib: portability and basic framework library
- pjlib-util: lexical scanner, XML, STUN, MD5, DNS, etc.
- pjmedia: media framework and codecs
- pjsip: SIP stacks (core, UA layer, SIMPLE, etc.)
- pjsip-apps: SIP apps (pjsua, pjsip-perf)
-= COMPILING =-
On Windows:
- Visual Studio 6: open pjproject.dsw
- Visual Studio 8/2005: open pjproject-vs8.sln
- Embedded VisualC 4: open open pjsip-apps\build\wince-evc4\wince_demos.vcw
- Build pjsua
With Makefile:
- on top level dir (e.g. ~/pjproject)
- ./configure && make dep && make clean && make
Binaries will be in pjsip-apps/bin.
-= PYTHON MODULE =-
On Windows:
- Visual Studio 6: open pjsip-apps\build\pjsip_apps.dsw
- Build py_pjsua module
With GNU and Python:
- cd pjsip-apps/src/py_pjsua
- python setup.py install
One Python sample application is provided:
pjsip-apps/src/py_pjsua/pjsua_app.py
-= PORTING =-
- Just need to port pjlib.
- PJLIB doc has detailed info how to do this.
- Must pass pjlib-test!
include build.mak
include build/host-$(HOST_NAME).mak
DIRS = pjlib pjlib-util pjnath third_party pjmedia pjsip pjsip-apps
ifdef MINSIZE
MAKE_FLAGS := MINSIZE=1
endif
all clean dep depend distclean print realclean:
for dir in $(DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
true; \
else \
exit 1; \
fi; \
done
doc:
@if test \( ! "$(WWWDIR)" == "" \) -a \( ! -d $(WWWDIR)/pjlib/docs/html \) ; then \
echo 'Directory "$(WWWDIR)" does not look like a valid pjsip web directory'; \
exit 1; \
fi
for dir in $(DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
true; \
else \
exit 1; \
fi; \
done
LIBS = pjlib/lib/libpj-sfl-$(TARGET_NAME).a \
pjlib-util/lib/libpjlib-util-sfl-$(TARGET_NAME).a \
pjnath/lib/libpjnath-sfl-$(TARGET_NAME).a \
pjmedia/lib/libpjmedia-sfl-$(TARGET_NAME).a \
pjmedia/lib/libpjmedia-codec-sfl-$(TARGET_NAME).a \
pjsip/lib/libpjsip-sfl-$(TARGET_NAME).a \
pjsip/lib/libpjsip-ua-sfl-$(TARGET_NAME).a \
pjsip/lib/libpjsip-simple-sfl-$(TARGET_NAME).a \
pjsip/lib/libpjsua-sfl-$(TARGET_NAME).a
BINS = pjsip-apps/bin/pjsua-sfl-$(TARGET_NAME)$(HOST_EXE)
size:
@echo -n 'Date: '
@date
@echo
@for lib in $(LIBS); do \
echo "$$lib:"; \
size -t $$lib | awk '{print $$1 "\t" $$2 "\t" $$3 "\t" $$6}'; \
echo; \
done
@echo
@for bin in $(BINS); do \
echo "size $$bin:"; \
size $$bin; \
done
#dos2unix:
# for f in `find . | egrep '(mak|h|c|S|s|Makefile)$$'`; do \
# dos2unix "$$f" > dos2unix.tmp; \
# cp dos2unix.tmp "$$f"; \
# done
# rm -f dos2unix.tmp
xhdrid:
for f in `find . | egrep '\.(h|c|S|s|cpp|hpp)$$'`; do \
echo Processing $$f...; \
cat $$f | sed 's/.*\$$Author\$$/ */' > /tmp/id; \
cp /tmp/id $$f; \
done
prefix = /usr/local
install:
mkdir -p $(DESTDIR)$(prefix)/lib
cp -L $$(find . -name '*.a') $(DESTDIR)$(prefix)/lib
mkdir -p $(DESTDIR)$(prefix)/include
cp -RL $$(find . -name include) $(DESTDIR)$(prefix)
cd $(DESTDIR)$(prefix)/lib && for i in $$(find . -name 'libpj*a'); do\
ln -s $$i $$(echo $$i | sed -e "s/-$(TARGET_NAME)//");\
done
mkdir -p $(DESTDIR)$(prefix)/lib/pkgconfig
sed -e "s!@PREFIX@!$(DESTDIR)$(prefix)!" libpj-sfl.pc.in > $(DESTDIR)/$(prefix)/lib/pkgconfig/libpj-sfl.pc
Build Instructions for PJLIB/PJMEDIA/PJSIP RTEMS Port
The RTEMS port uses the POSIX abstraction layer at the moment, and has been
tested with RTEMS 4.6 on i386 target.
Building RTEMS
---------------
I use RTEMS 4.6 on a cygwin host with i386/pc386 as target, but I think it
should work with different RTEMS versions/hosts/targets.
RTEMS was built with the following commands:
$ /opt/src/rtems-4.6.6/configure --enable-cxx --enable-posix --enable-networking --enable-rdbg --enable-tests --enable-rtemsbsp=pc386 --target=i386-rtems
$ make
$ make install
Supported Targets
-----------------
At the moment, pjlib supports i386 and mpc860 CPU target. For other targets,
you would need to create/tweak the appropriate "m-xxx.mak" in "build" directory
and the corresponding "m_xxx.h" header file in "pj/compat" directory.
Please refer to pjlib porting guide about how to port PJLIB to new CPU target.
Building PJLIB/PJMEDIA/PJSIP
----------------------------
Use the following steps to build the libraries:
1. Set RTEMS_LIBRARY_PATH environment variable to point to your BSP directory
(which is <RTEMS INSTALLATION POINT>/<BOARD SUPPORT PACKAGE>).
For example (with sh):
$ export RTEMS_LIBRARY_PATH=/opt/rtems-4.6/i386-rtems/pc386
2. Unfortunately pjproject's configure script is unable to create "build.mak"
for cross compilation (but this may change in the future), so we need to
create "build.mak" manually.
The file "README-configure" has some info about the variables in "build.mak".
For example, the "build.mak" for i386 target:
export MACHINE_NAME := i386
export OS_NAME := rtems
export HOST_NAME := mingw
export CC_NAME := gcc
export TARGET_NAME := i386-rtems
export CROSS_COMPILE := i386-rtems-
3. Put additional CFLAGS or LDFLAGS that are specific to your target in
"user.mak".
For example, my "user.mak" looks like this:
export CFLAGS +=
export LDFLAGS += -Wl,-Ttext,0x00100000 -Wl,--defsym -Wl,HeapSize=0x400000
4. Build the libraries:
$ make dep && make distclean && make
5. That should be it. The libraries should be in "lib" directory and
applications in "bin" directory.
Acknowledgements
----------------