Skip to content

Commit

Permalink
Imported "a newer version with autoconf contributed by Yate team"
Browse files Browse the repository at this point in the history
yate-ipp-0.0.1-1.tar.gz from yate.hosting.lv
  • Loading branch information
vir committed Feb 2, 2011
1 parent f6107ad commit 3f8a091
Show file tree
Hide file tree
Showing 10 changed files with 4,934 additions and 98 deletions.
182 changes: 182 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Makefile
# This file holds the make rules for a Yate module

# override DESTDIR at install time to prefix the install directory
DESTDIR :=

# override DEBUG at compile time to enable full debug or remove it all
DEBUG :=

AR := ar
CC := @CC@ -Wall
CXX := @CXX@ -Wall
SED := sed
DEFS :=
INCLUDES := -I@top_srcdir@ @IPP_INC@ @IPP_INC_CORE@
CCFLAGS:= -O2 @YATE_INC@
CFLAGS := $(subst -fno-check-new,,$(CCFLAGS))
LDFLAGS:= @YATE_LIB@
MODSTRIP:= @YATE_STR@

PROGS:= g723codec.yate g729codec.yate
LIBS := libg723.a libg729.a
O723 := decg723.o encg723.o owng723.o vadg723.o aux_tbls.o
O729 := decg729fp.o encg729fp.o owng729fp.o vadg729fp.o
INCFILES :=
IPPLIBS := -lippscmerged@IPP_SUFFIX@ \
-lippsrmerged@IPP_SUFFIX@ \
-lippsmerged@IPP_SUFFIX@ \
-lippcore@IPP_SUFFIX@
ifeq (@IPP_MERGED@,yes)
IPPLIBS := -lippscemerged@IPP_SUFFIX@ -lippsremerged@IPP_SUFFIX@ \
-lippsemerged@IPP_SUFFIX@ $(IPPLIBS)
endif

MKDEPS := ./config.status
CLEANS = $(PROGS) $(LIBS) $(O723) $(O729) core
COMPILE = $(CC) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
CCOMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CCFLAGS)
MODCOMP = $(CCOMPILE) $(MODFLAGS) $(MODSTRIP) $(LDFLAGS)
LINK = $(CXX) $(LDFLAGS)

prefix = @prefix@
exec_prefix = @exec_prefix@

confdir:= @YATE_CFG@
moddir := @YATE_MOD@
scrdir := @YATE_SCR@
skndir := @YATE_SKN@

# include optional local make rules
-include YateLocal.mak

.PHONY: all debug ddebug xdebug ndebug
all: $(PROGS)

debug:
$(MAKE) all DEBUG=-g3 MODSTRIP=

ddebug:
$(MAKE) all DEBUG='-g3 -DDEBUG' MODSTRIP=

xdebug:
$(MAKE) all DEBUG='-g3 -DXDEBUG' MODSTRIP=

ndebug:
$(MAKE) all DEBUG='-g0 -DNDEBUG'

.PHONY: clean distclean cvsclean clean-config-files
clean:
@-$(RM) $(CLEANS) 2>/dev/null

check-topdir:
@test -f configure || (echo "Must make this target in the top source directory"; exit 1)

clean-config-files: check-topdir
-rm -rf auto*.cache
-rm -f @CONFIGURE_FILES@

distclean: check-topdir clean clean-config-files

cvsclean: distclean
-rm -f configure yate-ipp.spec

.PHONY: strip install uninstall

strip: all
-strip --strip-debug --discard-locals $(PROGS)

install: all
@mkdir -p "$(DESTDIR)$(moddir)/" && \
for i in $(PROGS) ; do \
install -D "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
done
@mkdir -p "$(DESTDIR)$(confdir)/" && \
lst="`ls -1 @srcdir@/*.conf @srcdir@/*.sample @srcdir@/*.default @srcdir@/*.sql 2>/dev/null | sed 's/\.sample//g; s/\.default//g; s/[^ ]*\*\.[^ ]*//g' | sort | uniq`" ; \
for s in $$lst; do \
d="$(DESTDIR)$(confdir)/`echo $$s | sed 's,.*/,,'`" ; \
if [ -f "$$d" ]; then \
echo "Not overwriting existing $$d" ; \
else \
if [ ! -f "$$s" ]; then \
test -f "$$s.default" && s="$$s.default" ; \
test -f "$$s.sample" && s="$$s.sample" ; \
fi ; \
install -m 0644 "$$s" "$$d" ; \
fi ; \
done

uninstall:
@-for i in $(PROGS) ; do \
rm "$(DESTDIR)$(moddir)/$$i" ; \
done
@-rmdir "$(DESTDIR)$(moddir)"
@-rmdir "$(DESTDIR)$(confdir)" || echo "Remove conf files by hand if you want so"

.PHONY: snapshot tarball rpm
snapshot tarball: check-topdir clean
@if [ $@ = snapshot ]; then ver="`date '+SVN-%Y%m%d'`"; else ver="@PACKAGE_VERSION@-@PACKAGE_RELEASE@"; fi ; \
wd=`pwd|sed 's,^.*/,,'`; \
mkdir -p tarballs; cd ..; \
echo $$wd/tar-exclude >$$wd/tar-exclude; \
find $$wd -name Makefile >>$$wd/tar-exclude; \
find $$wd -name YateLocal.mak >>$$wd/tar-exclude; \
find $$wd -name '*.conf' >>$$wd/tar-exclude; \
find $$wd -name '*.cache' >>$$wd/tar-exclude; \
find $$wd -name '*~' >>$$wd/tar-exclude; \
find $$wd -name '.*.swp' >>$$wd/tar-exclude; \
if [ $@ = tarball ]; then \
find $$wd -name .svn >>$$wd/tar-exclude; \
find $$wd -name CVS >>$$wd/tar-exclude; \
find $$wd -name .cvsignore >>$$wd/tar-exclude; \
else \
find $$wd -name '*.spec' >>$$wd/tar-exclude; \
fi ; \
tar czf $$wd/tarballs/$$wd-$$ver.tar.gz \
--exclude $$wd/tarballs \
--exclude $$wd/config.status \
--exclude $$wd/config.log \
-X $$wd/tar-exclude \
$$wd; \
rm $$wd/tar-exclude

rpm: tarball
rpmbuild -tb tarballs/@PACKAGE_TARNAME@-@PACKAGE_VERSION@-@[email protected]

%.o: @srcdir@/%.cpp $(MKDEPS) $(INCFILES)
$(CCOMPILE) -c $<

%.o: @srcdir@/%.c $(MKDEPS) $(INCFILES)
$(COMPILE) -c $<

%.yate: @srcdir@/%.cpp $(MKDEPS) $(INCFILES)
$(MODCOMP) -o $@ $(LOCALFLAGS) $< $(LOCALLIBS)

g723codec.yate: libg723.a
g723codec.yate: LOCALLIBS = -L. -lg723 @IPP_LIB@ $(IPPLIBS)

g729codec.yate: libg729.a
g729codec.yate: LOCALLIBS = -L. -lg729 @IPP_LIB@ $(IPPLIBS)

libg723.a: $(O723)
$(AR) rcs $@ $^

libg729.a: $(O729)
$(AR) rcs $@ $^

@srcdir@/configure: @srcdir@/configure.in
cd @srcdir@ && autoconf

$(MKDEPS): @srcdir@/configure
$(MKDEPS) --recheck

Makefile: $(MKDEPS) @srcdir@/Makefile.in
$(MKDEPS) --file=$@

.PHONY: help
help:
@echo -e 'Usual make targets:\n'\
' all install uninstall\n'\
' clean distclean cvsclean (avoid this one!)\n'\
' debug ddebug xdebug (carefull!)\n'\
' snapshot tarball rpm'
63 changes: 63 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
YATE G.72x IPP codecs
---------------------

The YATE project aims to be a fully featured software PBX.

This component provides support for G.723 and G.729 codecs based on Intel(R)
Integrated Performance Primitives for Linux.


To build first configure the components:

./configure [options]

--with-yate=DIR use Yate from DIR (if yate-devel is not installed)
--with-ipp=DIR use IPP from DIR (else guesses /opt/intel/ipp/...)
--with-ippcore=CORE use specific core (else links for multiple core types)

If you have more than one IPP installed in /opt/intel/ipp or if you want to
use another one you must specify which to check:

./configure --with-ipp=/home/me/whatever/ipp-6.1


Then build and optionally install:

make
make install (this may need that you run as root)

If you choose not to install (perhaps you are running Yate from the build
directory) you can create symlinks in this manner:

ln -s g723codec.yate ../yate/modules
ln -s g729codec.yate ../yate/modules


IPP supported cores are:

32-bit
------
px - pentium mmx
a6 - pentium3 sse (removed in IPP 6.0)
w7 - pentium4 sse2
t7 - pentium4 prescott sse3
v8 - core2 ssse3
p8 - core2 penryn, core i7 nehalem sse4.1
s8 - atom (separate install in IPP 6)

64-bit
------
mx - older amd64 w/o sse3?
m7 - pentium4 sse3 em64t
u8 - core2 ssse3
y8 - core2 penryn, core i7 nehalem sse4.1
n8 - atom (separate install in IPP 6)

Itanium is a separate architecture that has no other core types.

You should specify a core type only if you are sure on which system the codec
is going to be installed. If a codec instance is created on an unsupported
system Yate will abort with an "Illegal instruction" message.

Note that if you create a codec optimized for Atom it won't run on anything
else as the libraries are separate.
24 changes: 24 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# Run this to generate a new configure script

ac=`which autoconf 2>/dev/null`
test -z "$ac" && ac=/usr/local/gnu-autotools/bin/autoconf
if [ -x "$ac" ]; then
"$ac" || exit $?
case "x$1" in
x--silent)
;;
x--configure)
shift
./configure "$@" || exit $?
echo "Finished! Now run make."
;;
*)
echo "Finished! Now run configure. If in doubt run ./configure --help"
;;
esac
else
echo "Please install Gnu autoconf to build from CVS." >&2
exit 1
fi
57 changes: 0 additions & 57 deletions build.sh

This file was deleted.

Loading

0 comments on commit 3f8a091

Please sign in to comment.