Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeForceZero committed Mar 16, 2016
0 parents commit 953c669
Show file tree
Hide file tree
Showing 2,138 changed files with 1,206,530 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/output/
**/bin/
**/obj/
**/*.log
.vs/
339 changes: 339 additions & 0 deletions COPYING

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions INSTALL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[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!

147 changes: 147 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
include build.mak
include build/host-$(HOST_NAME).mak
-include user.mak
include version.mak

LIB_DIRS = pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build
DIRS = $(LIB_DIRS) pjsip-apps/build $(EXTRA_DIRS)

ifdef MINSIZE
MAKE_FLAGS := MINSIZE=1
endif

all clean dep depend print:
for dir in $(DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
true; \
else \
exit 1; \
fi; \
done

distclean realclean:
for dir in $(DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
true; \
else \
exit 1; \
fi; \
done
$(HOST_RM) config.log
$(HOST_RM) config.status

lib:
for dir in $(LIB_DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir lib; then \
true; \
else \
exit 1; \
fi; \
done; \


.PHONY: lib doc

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 $@; then \
true; \
else \
exit 1; \
fi; \
done

LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \
pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
pjnath/lib/libpjnath-$(TARGET_NAME).a \
pjmedia/lib/libpjmedia-$(TARGET_NAME).a \
pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \
pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \
pjsip/lib/libpjsip-$(TARGET_NAME).a \
pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \
pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \
pjsip/lib/libpjsua-$(TARGET_NAME).a
BINS = pjsip-apps/bin/pjsua-$(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

selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test

pjlib-test: pjlib/bin/pjlib-test-$(TARGET_NAME)
cd pjlib/build && ../bin/pjlib-test-$(TARGET_NAME)

pjlib-util-test: pjlib-util/bin/pjlib-util-test-$(TARGET_NAME)
cd pjlib-util/build && ../bin/pjlib-util-test-$(TARGET_NAME)

pjnath-test: pjnath/bin/pjnath-test-$(TARGET_NAME)
cd pjnath/build && ../bin/pjnath-test-$(TARGET_NAME)

pjmedia-test: pjmedia/bin/pjmedia-test-$(TARGET_NAME)
cd pjmedia/build && ../bin/pjmedia-test-$(TARGET_NAME)

pjsip-test: pjsip/bin/pjsip-test-$(TARGET_NAME)
cd pjsip/build && ../bin/pjsip-test-$(TARGET_NAME)

pjsua-test:
cd tests/pjsua && python runall.py

install:
mkdir -p $(DESTDIR)$(libdir)/
# cp -af $(APP_LIB_FILES) $(DESTDIR)$(libdir)/
cp -af $(APP_LIBXX_FILES) $(DESTDIR)$(libdir)/
mkdir -p $(DESTDIR)$(includedir)/
for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
cp -RLf $$d/include/* $(DESTDIR)$(includedir)/; \
done
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
sed -e "s!@PREFIX@!$(prefix)!" libpjproject.pc.in | \
sed -e "s!@INCLUDEDIR@!$(includedir)!" | \
sed -e "s!@LIBDIR@!$(libdir)!" | \
sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \
sed -e "s!@PJ_LDLIBS@!!" | \
sed -e "s!@PJ_LDXXLIBS@!$(PJ_LDXXLIBS)!" | \
sed -e "s!@PJ_INSTALL_CFLAGS@!!" | \
sed -e "s!@PJ_INSTALL_CXXFLAGS@!$(PJ_INSTALL_CXXFLAGS)!" > $(DESTDIR)/$(libdir)/pkgconfig/libpjproject.pc

uninstall:
$(RM) $(DESTDIR)$(libdir)/pkgconfig/libpjproject.pc
-rmdir $(DESTDIR)$(libdir)/pkgconfig 2> /dev/null
for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
for f in $$d/include/*; do \
$(RM) -r "$(DESTDIR)$(includedir)/`basename $$f`"; \
done; \
done
-rmdir $(DESTDIR)$(includedir) 2> /dev/null
$(RM) $(addprefix $(DESTDIR)$(libdir)/,$(notdir $(APP_LIB_FILES)))
-rmdir $(DESTDIR)$(libdir) 2> /dev/null
87 changes: 87 additions & 0 deletions README-RTEMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@



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
----------------
Many thanks for Phil Torre <ptorre at zetron dot com>, who did most of the
initial porting and testing with pjlib etc. All credits go to him.



Loading

0 comments on commit 953c669

Please sign in to comment.