2005-11-12 16:27:19 -05:00
|
|
|
EXTRA_DIST =
|
2007-03-16 15:20:24 -04:00
|
|
|
SUBDIRS = . src
|
2007-03-12 22:26:00 -04:00
|
|
|
AUTOMAKE_OPTS = foreign
|
2005-11-12 16:27:19 -05:00
|
|
|
NAME=freeswitch
|
2006-01-02 13:31:50 -05:00
|
|
|
PREFIX=$(prefix)
|
2006-12-16 18:22:45 -05:00
|
|
|
|
2007-03-10 23:02:10 -05:00
|
|
|
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
|
2007-03-12 00:21:54 -04:00
|
|
|
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
|
2007-03-10 23:02:10 -05:00
|
|
|
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
|
2007-03-11 01:36:04 -05:00
|
|
|
BASE = $(switch_srcdir)
|
2007-03-16 15:20:24 -04:00
|
|
|
OSARCH=`uname -s`
|
2007-03-11 01:36:04 -05:00
|
|
|
|
|
|
|
LIBTOOL=$(switch_builddir)/libtool
|
2007-03-09 15:44:13 -05:00
|
|
|
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
2007-03-16 23:00:30 -04:00
|
|
|
TOUCH_TARGET=if test -f "$@" ; then touch "$@" ; fi ;
|
2007-03-09 15:44:13 -05:00
|
|
|
|
2006-05-05 09:35:33 -04:00
|
|
|
if CRASHPROT
|
|
|
|
AM_CFLAGS += -DCRASH_PROT
|
|
|
|
endif
|
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
libfreeswitch_la_SOURCES = \
|
2007-03-09 15:44:13 -05:00
|
|
|
src/switch_apr.c \
|
2005-11-12 16:27:19 -05:00
|
|
|
src/switch_buffer.c \
|
|
|
|
src/switch_caller.c \
|
|
|
|
src/switch_channel.c \
|
|
|
|
src/switch_config.c \
|
|
|
|
src/switch_console.c \
|
|
|
|
src/switch_core.c \
|
2007-03-09 15:44:13 -05:00
|
|
|
src/switch_core_db.c\
|
2005-11-12 16:27:19 -05:00
|
|
|
src/switch_loadable_module.c \
|
2005-12-13 14:53:29 -05:00
|
|
|
src/switch_utils.c \
|
2006-01-05 21:07:24 -05:00
|
|
|
src/switch_event.c \
|
2006-01-26 12:57:25 -05:00
|
|
|
src/switch_resample.c \
|
2007-03-09 15:44:13 -05:00
|
|
|
src/switch_regex.c\
|
|
|
|
src/switch_rtp.c\
|
2006-04-04 12:07:40 -04:00
|
|
|
src/switch_ivr.c \
|
2006-04-11 17:13:44 -04:00
|
|
|
src/switch_stun.c\
|
2006-05-05 17:05:11 -04:00
|
|
|
src/switch_log.c\
|
|
|
|
src/switch_xml.c
|
2006-01-05 21:01:11 -05:00
|
|
|
|
2007-03-11 01:49:21 -05:00
|
|
|
library_includedir = $(PREFIX)/include
|
2007-03-09 15:44:13 -05:00
|
|
|
|
2006-02-22 12:20:39 -05:00
|
|
|
library_include_HEADERS = \
|
2006-04-03 17:00:13 -04:00
|
|
|
src/include/switch_am_config.h\
|
2006-02-22 12:20:39 -05:00
|
|
|
src/include/switch.h\
|
|
|
|
src/include/switch_apr.h\
|
|
|
|
src/include/switch_buffer.h\
|
|
|
|
src/include/switch_caller.h\
|
|
|
|
src/include/switch_channel.h\
|
|
|
|
src/include/switch_config.h\
|
|
|
|
src/include/switch_console.h\
|
|
|
|
src/include/switch_core.h\
|
2007-03-09 15:44:13 -05:00
|
|
|
src/include/switch_core_db.h\
|
2006-02-22 12:20:39 -05:00
|
|
|
src/include/switch_event.h\
|
|
|
|
src/include/switch_frame.h\
|
|
|
|
src/include/switch_ivr.h\
|
|
|
|
src/include/switch_loadable_module.h\
|
|
|
|
src/include/switch_module_interfaces.h\
|
|
|
|
src/include/switch_platform.h\
|
|
|
|
src/include/switch_resample.h\
|
2007-03-09 15:44:13 -05:00
|
|
|
src/include/switch_regex.h\
|
2006-02-22 12:20:39 -05:00
|
|
|
src/include/switch_types.h\
|
|
|
|
src/include/switch_utils.h\
|
2006-04-03 17:00:13 -04:00
|
|
|
src/include/switch_rtp.h\
|
2006-04-11 17:13:44 -04:00
|
|
|
src/include/switch_stun.h\
|
2006-05-05 17:05:11 -04:00
|
|
|
src/include/switch_log.h\
|
|
|
|
src/include/switch_xml.h
|
2006-02-22 12:20:39 -05:00
|
|
|
|
2007-03-16 15:20:24 -04:00
|
|
|
CORE_CFLAGS = `$(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags --includes`
|
|
|
|
CORE_CFLAGS += `$(switch_srcdir)/libs/apr-util/apu-1-config --includes`
|
2007-03-11 01:36:04 -05:00
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/sqlite
|
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/pcre
|
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
|
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include
|
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/libresample/include
|
|
|
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/libteletone/src
|
2007-03-09 15:44:13 -05:00
|
|
|
|
2007-03-11 04:33:49 -04:00
|
|
|
CORE_LIBS = libs/apr/libapr-1.la libs/apr-util/libaprutil-1.la
|
2007-03-11 03:36:49 -04:00
|
|
|
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la
|
|
|
|
CORE_LIBS += libs/srtp/libsrtp.la libs/libresample/libresample.la
|
|
|
|
CORE_LIBS += libs/libteletone/libteletone.la
|
2007-03-09 15:44:13 -05:00
|
|
|
|
|
|
|
lib_LTLIBRARIES = libfreeswitch.la
|
2007-03-10 23:02:10 -05:00
|
|
|
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
|
2007-03-11 03:36:49 -04:00
|
|
|
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
|
|
|
|
libfreeswitch_la_LIBADD = $(CORE_LIBS)
|
2006-03-07 15:09:10 -05:00
|
|
|
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
|
2005-11-12 16:27:19 -05:00
|
|
|
|
2007-03-11 01:36:04 -05:00
|
|
|
MOD_LINK = $(BASE)/libfreeswitch.la
|
|
|
|
|
|
|
|
CLEANFILES = src/include/switch_version.h
|
2007-03-13 02:17:58 -04:00
|
|
|
BUILT_SOURCES = src/include/switch_version.h
|
2007-03-10 23:02:10 -05:00
|
|
|
|
2007-03-11 01:36:04 -05:00
|
|
|
bin_PROGRAMS = freeswitch
|
2007-03-13 02:17:58 -04:00
|
|
|
freeswitch_SOURCES = src/switch.c
|
|
|
|
nodist_freeswitch_SOURCES = src/include/switch_version.h
|
2005-11-12 16:27:19 -05:00
|
|
|
freeswitch_CFLAGS = $(AM_CFLAGS)
|
2007-03-11 01:36:04 -05:00
|
|
|
freeswitch_LDADD = ${MOD_LINK}
|
2006-03-07 15:09:10 -05:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
install-data-local:
|
|
|
|
@echo Installing $(NAME)
|
|
|
|
@for x in conf mod db log log/xml_cdr bin scripts htdocs grammar ; do \
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \
|
|
|
|
done
|
|
|
|
@if [ ! -f $(DESTDIR)$(PREFIX)/conf/freeswitch.xml ] ; then \
|
|
|
|
$(INSTALL) conf/*.xml $(DESTDIR)$(PREFIX)/conf ; \
|
|
|
|
fi
|
|
|
|
@if [ -f .libs/$(NAME) ] ; then \
|
|
|
|
$(INSTALL) .libs/$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ; \
|
|
|
|
else \
|
|
|
|
$(INSTALL) ./$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ;\
|
|
|
|
fi
|
|
|
|
|
2007-03-13 02:17:58 -04:00
|
|
|
.version:
|
|
|
|
touch .version
|
|
|
|
|
|
|
|
src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
|
|
|
|
@if test ! -f .noversion ; then \
|
|
|
|
force=0 ; \
|
|
|
|
version=`svnversion . -n || echo hacked` ; \
|
|
|
|
oldversion=`cat .version 2>/dev/null || echo "0"` ; \
|
|
|
|
test ! -f src/include/switch_version.h || grep "@SVN_VERSION@" src/include/switch_version.h && force=1 ; \
|
|
|
|
if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
|
|
|
|
cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$$version/g" > src/include/switch_version.h ; \
|
|
|
|
echo $$version > .version ; \
|
|
|
|
fi ; \
|
|
|
|
fi ;
|
2005-12-28 10:42:49 -05:00
|
|
|
|
2007-03-13 02:44:30 -04:00
|
|
|
update:
|
|
|
|
@if test -d .svn ; then \
|
|
|
|
test ! -f .version || rm -f .version ; \
|
|
|
|
echo Updating... ; \
|
|
|
|
svn update ; \
|
|
|
|
else \
|
|
|
|
echo "This source directory is not an svn working copy" ; \
|
|
|
|
fi
|
|
|
|
|
2005-12-28 10:42:49 -05:00
|
|
|
.nodepends:
|
2005-12-21 12:22:38 -05:00
|
|
|
touch .nodepends
|
|
|
|
|
2005-12-28 10:42:49 -05:00
|
|
|
nodepends: .nodepends
|
|
|
|
|
|
|
|
yesdepends:
|
|
|
|
rm .nodepends
|
|
|
|
|
2007-03-16 23:00:30 -04:00
|
|
|
libs/apr/libapr-1.la: libs/apr libs/apr/.update
|
2007-03-11 03:36:49 -04:00
|
|
|
cd libs/apr && $(MAKE)
|
2007-03-16 23:00:30 -04:00
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update
|
2007-03-11 03:36:49 -04:00
|
|
|
cd libs/apr-util && $(MAKE)
|
2007-03-16 23:00:30 -04:00
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/sqlite/libsqlite3.la: libs/sqlite libs/sqlite/.update
|
|
|
|
cd libs/sqlite && $(MAKE)
|
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/pcre/libpcre.la: libs/pcre libs/pcre/.update
|
2007-03-11 03:36:49 -04:00
|
|
|
cd libs/pcre && $(MAKE)
|
2007-03-16 23:00:30 -04:00
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/srtp/libsrtp.la: libs/srtp libs/srtp/.update
|
2007-03-11 03:36:49 -04:00
|
|
|
cd libs/srtp && $(MAKE)
|
2007-03-16 23:00:30 -04:00
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/libteletone/libteletone.la: libs/libteletone libs/libteletone/.update
|
2007-03-11 03:36:49 -04:00
|
|
|
cd libs/libteletone && $(MAKE)
|
2007-03-16 23:00:30 -04:00
|
|
|
$(TOUCH_TARGET)
|
|
|
|
|
|
|
|
libs/libresample/libresample.la: libs/libresample libs/libresample/.update
|
|
|
|
cd libs/libresample && $(MAKE)
|
|
|
|
$(TOUCH_TARGET)
|
2007-03-11 03:36:49 -04:00
|
|
|
|
2007-03-16 23:00:30 -04:00
|
|
|
core: libfreeswitch.la
|
2007-03-11 03:36:49 -04:00
|
|
|
|
2007-03-14 18:30:02 -04:00
|
|
|
install_core: install-libLTLIBRARIES
|
|
|
|
|
|
|
|
core_install: install_core
|
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
everything: install
|
2005-12-28 00:17:21 -05:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
installall: install
|
2006-01-05 16:03:22 -05:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
sure: clean modwipe uninstall installall
|
2006-01-05 16:03:22 -05:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
wayclean: clean
|
2006-09-06 23:58:01 -04:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
modules: libfreeswitch.la
|
|
|
|
$(MAKE) -C src/mod
|
2007-03-14 10:35:11 -04:00
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
install_mod: libfreeswitch.la
|
|
|
|
$(MAKE) -C src/mod install
|
2007-03-14 10:35:11 -04:00
|
|
|
|
2007-03-14 18:30:02 -04:00
|
|
|
mod_install: install_mod
|
|
|
|
|
2007-03-14 10:35:11 -04:00
|
|
|
uninstall_mod:
|
|
|
|
$(MAKE) -C src/mod uninstall
|
|
|
|
|
2007-03-14 18:30:02 -04:00
|
|
|
mod_uninstall: uninstall_mod
|
|
|
|
|
2007-03-12 22:26:00 -04:00
|
|
|
modclean:
|
|
|
|
$(MAKE) -C src/mod clean
|
2006-01-05 16:03:22 -05:00
|
|
|
|
2006-01-03 17:36:56 -05:00
|
|
|
modwipe:
|
2006-04-06 23:58:22 -04:00
|
|
|
rm -f $(PREFIX)/mod/*.${DYNAMIC_LIB_EXTEN}
|
2005-11-12 16:27:19 -05:00
|
|
|
|
2006-01-01 10:23:12 -05:00
|
|
|
dox:
|
2006-01-03 17:49:25 -05:00
|
|
|
cd docs && doxygen $(PWD)/docs/Doxygen.conf
|
2005-11-12 16:27:19 -05:00
|
|
|
|
|
|
|
eclean: clean
|
|
|
|
rm -f `find . -type f -name \*~`
|
|
|
|
rm -f `find . -type f -name \.*~`
|
|
|
|
rm -f `find . -type f -name \#\*`
|
|
|
|
rm -f `find . -type f -name \.\#\*`
|
|
|
|
rm -f `find . -type f -name core\*`
|
|
|
|
rm -f *.tar *.tgz *.gz
|
|
|
|
|
|
|
|
megaclean: eclean modclean
|
2007-03-16 21:45:13 -04:00
|
|
|
rm -f `find ./libs -name \*.la`
|