2005-11-12 21:27:19 +00:00
|
|
|
EXTRA_DIST =
|
2007-03-11 06:49:21 +00:00
|
|
|
SUBDIRS =
|
2006-01-30 22:36:18 +00:00
|
|
|
AUTOMAKE_OPTS = gnu foreign
|
2005-11-12 21:27:19 +00:00
|
|
|
NAME=freeswitch
|
2006-01-02 18:31:50 +00:00
|
|
|
PREFIX=$(prefix)
|
2006-12-16 23:22:45 +00:00
|
|
|
|
2007-03-11 04:02:10 +00:00
|
|
|
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
|
2006-12-16 23:22:45 +00:00
|
|
|
AM_CPPFLAGS = $(AM_CFLAGS)
|
2007-03-11 04:02:10 +00:00
|
|
|
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
|
2007-03-11 06:36:04 +00:00
|
|
|
BASE = $(switch_srcdir)
|
2007-03-09 20:44:13 +00:00
|
|
|
OSARCH=$(shell uname -s)
|
2007-03-11 06:36:04 +00:00
|
|
|
|
|
|
|
LIBTOOL=$(switch_builddir)/libtool
|
2007-03-09 20:44:13 +00:00
|
|
|
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
|
|
|
|
2006-05-05 13:35:33 +00:00
|
|
|
if CRASHPROT
|
|
|
|
AM_CFLAGS += -DCRASH_PROT
|
|
|
|
endif
|
|
|
|
|
2005-11-12 21:27:19 +00:00
|
|
|
libfreeswitch_la_SOURCES = \
|
2007-03-09 20:44:13 +00:00
|
|
|
src/switch_apr.c \
|
2005-11-12 21:27:19 +00: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 20:44:13 +00:00
|
|
|
src/switch_core_db.c\
|
2005-11-12 21:27:19 +00:00
|
|
|
src/switch_loadable_module.c \
|
2005-12-13 19:53:29 +00:00
|
|
|
src/switch_utils.c \
|
2006-01-06 02:07:24 +00:00
|
|
|
src/switch_event.c \
|
2006-01-26 17:57:25 +00:00
|
|
|
src/switch_resample.c \
|
2007-03-09 20:44:13 +00:00
|
|
|
src/switch_regex.c\
|
|
|
|
src/switch_rtp.c\
|
2006-04-04 16:07:40 +00:00
|
|
|
src/switch_ivr.c \
|
2006-04-11 21:13:44 +00:00
|
|
|
src/switch_stun.c\
|
2006-05-05 21:05:11 +00:00
|
|
|
src/switch_log.c\
|
|
|
|
src/switch_xml.c
|
2006-01-06 02:01:11 +00:00
|
|
|
|
2007-03-11 06:49:21 +00:00
|
|
|
library_includedir = $(PREFIX)/include
|
2007-03-09 20:44:13 +00:00
|
|
|
|
2006-02-22 17:20:39 +00:00
|
|
|
library_include_HEADERS = \
|
2006-04-03 21:00:13 +00:00
|
|
|
src/include/switch_am_config.h\
|
2006-02-22 17:20:39 +00: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 20:44:13 +00:00
|
|
|
src/include/switch_core_db.h\
|
2006-02-22 17:20:39 +00: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 20:44:13 +00:00
|
|
|
src/include/switch_regex.h\
|
2006-02-22 17:20:39 +00:00
|
|
|
src/include/switch_types.h\
|
|
|
|
src/include/switch_utils.h\
|
2006-04-03 21:00:13 +00:00
|
|
|
src/include/switch_rtp.h\
|
2006-04-04 16:07:40 +00:00
|
|
|
src/include/switch_version.h\
|
2006-04-11 21:13:44 +00:00
|
|
|
src/include/switch_stun.h\
|
2006-05-05 21:05:11 +00:00
|
|
|
src/include/switch_log.h\
|
|
|
|
src/include/switch_xml.h
|
2006-02-22 17:20:39 +00:00
|
|
|
|
2007-03-11 04:02:10 +00:00
|
|
|
CORE_CFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags --includes)
|
|
|
|
CORE_CFLAGS += $(shell $(switch_srcdir)/libs/apr-util/apu-1-config --includes)
|
2007-03-11 06:36:04 +00: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 20:44:13 +00:00
|
|
|
|
2007-03-11 08:33:49 +00:00
|
|
|
CORE_LIBS = libs/apr/libapr-1.la libs/apr-util/libaprutil-1.la
|
2007-03-11 07:36:49 +00: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 20:44:13 +00:00
|
|
|
|
|
|
|
lib_LTLIBRARIES = libfreeswitch.la
|
2007-03-11 04:02:10 +00:00
|
|
|
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
|
2007-03-11 07:36:49 +00:00
|
|
|
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
|
|
|
|
libfreeswitch_la_LIBADD = $(CORE_LIBS)
|
2006-03-07 20:09:10 +00:00
|
|
|
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
|
2005-11-12 21:27:19 +00:00
|
|
|
|
2007-03-11 07:36:49 +00:00
|
|
|
$(libfreeswitch_la_SOURCES): deps
|
2007-03-09 20:44:13 +00:00
|
|
|
|
2007-03-11 06:36:04 +00:00
|
|
|
MOD_LINK = $(BASE)/libfreeswitch.la
|
|
|
|
|
|
|
|
CLEANFILES = src/include/switch_version.h
|
2007-03-11 04:02:10 +00:00
|
|
|
|
2007-03-11 06:36:04 +00:00
|
|
|
bin_PROGRAMS = freeswitch
|
|
|
|
freeswitch_SOURCES = src/switch.c\
|
|
|
|
src/include/switch_version.h
|
2005-11-12 21:27:19 +00:00
|
|
|
freeswitch_CFLAGS = $(AM_CFLAGS)
|
2007-03-11 06:36:04 +00:00
|
|
|
freeswitch_LDADD = ${MOD_LINK}
|
2006-03-07 20:09:10 +00:00
|
|
|
|
|
|
|
version: Makefile src/include/switch_version.h
|
2006-09-30 07:44:25 +00:00
|
|
|
MAKE=$(MAKE) ./build/checkversion.sh
|
2005-11-12 21:27:19 +00:00
|
|
|
|
2006-01-06 17:44:19 +00:00
|
|
|
newversion: Makefile
|
2006-09-30 07:44:25 +00:00
|
|
|
MAKE=$(MAKE) ./build/checkversion.sh force
|
2006-01-30 22:15:33 +00:00
|
|
|
$(MAKE)
|
2005-12-28 15:42:49 +00:00
|
|
|
|
|
|
|
.nodepends:
|
2005-12-21 17:22:38 +00:00
|
|
|
touch .nodepends
|
|
|
|
|
2005-12-28 15:42:49 +00:00
|
|
|
nodepends: .nodepends
|
|
|
|
|
|
|
|
yesdepends:
|
|
|
|
rm .nodepends
|
|
|
|
|
2007-03-11 07:36:49 +00:00
|
|
|
sqlite:
|
|
|
|
cd libs/sqlite && $(MAKE)
|
|
|
|
|
|
|
|
apr:
|
|
|
|
cd libs/apr && $(MAKE)
|
|
|
|
|
|
|
|
apr-util:
|
|
|
|
cd libs/apr-util && $(MAKE)
|
|
|
|
|
|
|
|
pcre:
|
|
|
|
cd libs/pcre && $(MAKE)
|
|
|
|
|
|
|
|
srtp:
|
|
|
|
cd libs/srtp && $(MAKE)
|
|
|
|
|
|
|
|
resample:
|
|
|
|
cd libs/libresample && $(MAKE)
|
|
|
|
|
|
|
|
teletone:
|
|
|
|
cd libs/libteletone && $(MAKE)
|
|
|
|
|
|
|
|
deps: version sqlite apr apr-util pcre srtp resample teletone
|
|
|
|
|
|
|
|
core: deps libfreeswitch.la
|
|
|
|
|
|
|
|
modules: libfreeswitch.la
|
2006-02-14 16:42:26 +00:00
|
|
|
@if [ ! -f $(PWD)/modules.conf ] ; then cp $(PWD)/modules.conf.in $(PWD)/modules.conf ; fi
|
2005-11-12 21:27:19 +00:00
|
|
|
@echo making modules
|
2006-02-13 19:56:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env DYLD_LIBRARY_PATH "$(PREFIX)/lib:$DYLD_LIBRARY_PATH"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LD_LIBRARY_PATH "$(PREFIX)/lib:$LD_LIBRARY_PATH"
|
|
|
|
@./build/addenv.sh build/freeswitch.env PREFIX "$(PREFIX)"
|
2007-03-11 06:36:04 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env BASE "$(switch_srcdir)"
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)"
|
2006-03-05 20:30:12 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)"
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)"
|
2007-03-11 14:03:58 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) $(MOD_LINK)"
|
2006-12-16 23:22:45 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env CFLAGS "$(AM_CFLAGS)"
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
2006-05-24 14:42:21 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env CFGARGS "$(AM_CFGARGS)"
|
2007-03-11 06:49:21 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env LINK "$(LINK)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LTCOMPILE "$(LTCOMPILE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LIBTOOL "$(LIBTOOL)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LTINSTALL "$(LTINSTALL)"
|
2006-09-23 23:27:44 +00:00
|
|
|
@cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i || exit 1; done
|
2006-02-13 19:56:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2005-11-12 21:27:19 +00:00
|
|
|
|
|
|
|
modclean:
|
2006-02-13 19:56:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
2006-03-05 23:44:04 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)"
|
2006-09-23 23:27:44 +00:00
|
|
|
@cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i clean || exit 1; done
|
2006-02-13 19:56:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2005-12-28 05:17:21 +00:00
|
|
|
|
2006-01-30 20:13:24 +00:00
|
|
|
everything: install install_mod
|
2006-01-05 21:03:22 +00:00
|
|
|
|
|
|
|
installall: install install_mod
|
|
|
|
|
2006-09-07 03:58:01 +00:00
|
|
|
sure: clean modclean modwipe uninstall installall
|
|
|
|
|
2006-01-05 21:03:22 +00:00
|
|
|
wayclean: clean modclean
|
|
|
|
|
2006-01-03 22:36:56 +00:00
|
|
|
modwipe:
|
2006-04-07 03:58:22 +00:00
|
|
|
rm -f $(PREFIX)/mod/*.${DYNAMIC_LIB_EXTEN}
|
2005-11-12 21:27:19 +00:00
|
|
|
|
2005-12-28 15:42:49 +00:00
|
|
|
install_mod: modules
|
2005-11-12 21:27:19 +00:00
|
|
|
@echo Installing $(NAME)
|
2007-03-11 06:36:04 +00:00
|
|
|
@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
|
2005-11-12 21:27:19 +00:00
|
|
|
@echo Installing Modules
|
2006-02-13 19:56:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 19:51:17 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env PREFIX "$(PREFIX)"
|
2006-03-05 20:30:12 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env DYLD_LIBRARY_PATH "$(PREFIX)/lib:$DYLD_LIBRARY_PATH"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LD_LIBRARY_PATH "$(PREFIX)/lib:$LD_LIBRARY_PATH"
|
|
|
|
@./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)"
|
2007-03-11 06:36:04 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env BASE "$(switch_srcdir)"
|
2006-03-05 20:30:12 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)"
|
2007-03-11 14:03:58 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) $(MOD_LINK)"
|
2006-12-16 23:22:45 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env CFLAGS "$(AM_CFLAGS)"
|
2006-03-05 20:30:12 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
2007-03-11 06:49:21 +00:00
|
|
|
@./build/addenv.sh build/freeswitch.env LINK "$(LINK)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LTCOMPILE "$(LTCOMPILE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LTINSTALL "$(LTINSTALL)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LIBTOOL "$(LIBTOOL)"
|
2006-09-23 23:27:44 +00:00
|
|
|
@cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i install || exit 1; done
|
2006-03-05 20:32:01 +00:00
|
|
|
@rm -f build/freeswitch.env
|
2005-11-12 21:27:19 +00:00
|
|
|
@echo done
|
2006-03-05 20:30:12 +00:00
|
|
|
|
2006-01-01 15:23:12 +00:00
|
|
|
dox:
|
2006-01-03 22:49:25 +00:00
|
|
|
cd docs && doxygen $(PWD)/docs/Doxygen.conf
|
2005-11-12 21:27:19 +00: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
|
2006-01-26 04:21:06 +00:00
|
|
|
rm -fr .depend `find . -name .complete`
|