2005-11-12 16:27:19 -05:00
|
|
|
EXTRA_DIST =
|
2005-12-21 11:24:37 -05:00
|
|
|
SUBDIRS =
|
2006-01-30 17:36:18 -05:00
|
|
|
AUTOMAKE_OPTS = gnu foreign
|
2006-01-30 17:15:33 -05:00
|
|
|
AM_MAKE=`which gmake 2>/dev/null || which make 2>/dev/null || make`
|
2006-01-30 17:04:09 -05:00
|
|
|
MAKE=$(AM_MAKE)
|
2005-11-12 16:27:19 -05:00
|
|
|
NAME=freeswitch
|
2006-01-02 13:31:50 -05:00
|
|
|
PREFIX=$(prefix)
|
2005-11-12 16:27:19 -05:00
|
|
|
APR_CONFIG=$(prefix)/bin/apr-1-config
|
2005-12-21 17:38:53 -05:00
|
|
|
APU_CONFIG=$(prefix)/bin/apu-1-config
|
2006-04-03 17:00:13 -04:00
|
|
|
AM_CFLAGS = -I$(PREFIX)/include $(shell $(APR_CONFIG) --cflags --cppflags --includes) -I${prefix}/include/srtp
|
2006-01-20 13:21:32 -05:00
|
|
|
AM_LDFLAGS = -L$(PREFIX)/lib
|
|
|
|
AM_LDFLAGS += $(shell $(APR_CONFIG) --link-ld --libs )
|
|
|
|
AM_CFLAGS += $(shell $(APU_CONFIG) --includes)
|
2006-03-07 15:09:10 -05:00
|
|
|
AM_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
|
2006-04-03 20:14:51 -04:00
|
|
|
AM_LDFLAGS += -lm -L/usr/local/lib/db42 -L/usr/local/lib
|
2005-11-18 19:10:16 -05:00
|
|
|
OSARCH=$(shell uname -s)
|
|
|
|
if ISLINUX
|
|
|
|
AM_LDFLAGS += -Wl,-E
|
|
|
|
endif
|
|
|
|
|
2006-01-25 18:59:02 -05:00
|
|
|
if IS64BITLINUX
|
2006-01-30 10:53:38 -05:00
|
|
|
AM_CFLAGS += -m64 -march=k8 -fPIC
|
2006-01-25 18:59:02 -05:00
|
|
|
endif
|
|
|
|
|
2006-03-05 15:30:12 -05:00
|
|
|
#put elsif win here
|
2005-12-13 16:26:03 -05:00
|
|
|
if ISMAC
|
|
|
|
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
2006-03-05 15:30:12 -05:00
|
|
|
AM_CFLAGS += -DMACOSX
|
|
|
|
DYNAMIC_LIB_EXTEN=dylib
|
2005-12-13 16:30:10 -05:00
|
|
|
else
|
|
|
|
SOLINK=-shared -Xlinker -x
|
2006-03-05 15:30:12 -05:00
|
|
|
DYNAMIC_LIB_EXTEN=so
|
2005-12-13 16:26:03 -05:00
|
|
|
endif
|
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
AM_CFLAGS += -fPIC -Wall
|
2005-12-21 11:24:37 -05:00
|
|
|
AM_CFLAGS +=-I$(PWD)/src/sqlite -I$(PWD) -I$(PWD)/src/include -I$(PREFIX)/include
|
2005-11-12 16:27:19 -05:00
|
|
|
AM_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
|
|
|
|
AM_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
|
|
|
|
AM_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
|
2005-12-21 17:25:22 -05:00
|
|
|
AM_CFLAGS += -DSWITCH_DB_DIR=\"$(PREFIX)/db\"
|
2006-02-25 22:16:23 -05:00
|
|
|
AM_CFLAGS += -DSWITCH_LOG_DIR=\"$(PREFIX)/log\"
|
2006-02-28 16:21:48 -05:00
|
|
|
AM_CFLAGS += -DSWITCH_SCRIPT_DIR=\"$(PREFIX)/scripts\"
|
2006-01-06 12:44:19 -05:00
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
|
|
|
|
libfreeswitch_la_SOURCES = \
|
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\
|
|
|
|
src/include/switch_event.h\
|
|
|
|
src/include/switch_frame.h\
|
2006-01-26 12:57:25 -05:00
|
|
|
src/include/switch_ivr.h\
|
2006-02-22 12:20:39 -05:00
|
|
|
src/include/switch_loadable_module.h\
|
|
|
|
src/include/switch_module_interfaces.h\
|
|
|
|
src/include/switch_platform.h\
|
|
|
|
src/include/switch_resample.h\
|
|
|
|
src/include/switch_sqlite.h\
|
|
|
|
src/include/switch_types.h\
|
|
|
|
src/include/switch_utils.h\
|
|
|
|
src/include/switch_version.h\
|
2006-04-03 17:00:13 -04:00
|
|
|
src/inclide/switch_rtp.h\
|
|
|
|
src/switch_rtp.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 \
|
|
|
|
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 \
|
|
|
|
src/switch_ivr.c
|
2006-01-05 21:01:11 -05:00
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
|
|
|
|
#bindir = $(PREFIX)/bin
|
|
|
|
#libdir = $(PREFIX)/lib
|
|
|
|
library_includedir = $(PREFIX)/include
|
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\
|
|
|
|
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\
|
|
|
|
src/include/switch_sqlite.h\
|
|
|
|
src/include/switch_types.h\
|
|
|
|
src/include/switch_utils.h\
|
2006-04-03 17:00:13 -04:00
|
|
|
src/include/switch_rtp.h\
|
2006-02-22 12:20:39 -05:00
|
|
|
src/include/switch_version.h
|
|
|
|
|
2006-03-07 15:09:10 -05:00
|
|
|
BUILT_SOURCES = version depends
|
|
|
|
CLEANFILES = src/include/switch_version.h
|
2005-11-12 16:27:19 -05:00
|
|
|
|
2006-01-05 21:01:11 -05:00
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
lib_LTLIBRARIES = libfreeswitch.la
|
|
|
|
libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g
|
|
|
|
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
|
2006-04-03 19:35:20 -04:00
|
|
|
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3
|
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
|
|
|
|
|
|
|
bin_PROGRAMS = freeswitch
|
2006-03-07 15:09:10 -05:00
|
|
|
freeswitch_SOURCES = src/switch.c\
|
|
|
|
src/include/switch_version.h
|
2005-11-12 16:27:19 -05:00
|
|
|
freeswitch_CFLAGS = $(AM_CFLAGS)
|
2006-04-03 18:33:46 -04:00
|
|
|
freeswitch_LDADD = ${top_builddir}/libfreeswitch.la
|
2006-03-07 15:09:10 -05:00
|
|
|
|
2006-01-06 12:44:19 -05:00
|
|
|
|
2006-01-30 17:42:55 -05:00
|
|
|
|
2006-01-30 18:01:04 -05:00
|
|
|
|
2006-03-07 15:09:10 -05:00
|
|
|
version: Makefile src/include/switch_version.h
|
2006-02-07 19:57:35 -05:00
|
|
|
./build/checkversion.sh
|
2005-11-12 16:27:19 -05:00
|
|
|
|
2006-01-06 12:44:19 -05:00
|
|
|
newversion: Makefile
|
2006-02-07 19:57:35 -05:00
|
|
|
./build/checkversion.sh force
|
2006-01-30 17:15:33 -05:00
|
|
|
$(MAKE)
|
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
|
|
|
|
|
2006-02-13 14:51:17 -05:00
|
|
|
depends:
|
|
|
|
@echo making depends
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 14:51:17 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env PREFIX $(PREFIX)
|
|
|
|
@./build/addenv.sh build/freeswitch.env MAKE $(MAKE)
|
|
|
|
./build/buildlib.sh . install sqlite-3.2.8.tar.gz --prefix=$(PREFIX) --disable-tcl --enable-threadsafe
|
2006-03-27 13:01:28 -05:00
|
|
|
./build/buildlib.sh . install apr-1.2.6.tar.gz --prefix=$(PREFIX)
|
|
|
|
./build/buildlib.sh . install apr-util-1.2.6.tar.gz --with-apr=../apr-1.2.6 --prefix=$(PREFIX)
|
2006-02-13 14:51:17 -05:00
|
|
|
./build/buildlib.sh . libresample-0.1.3.tgz --prefix=$(PREFIX)
|
2006-02-22 10:23:10 -05:00
|
|
|
./build/buildlib.sh . install libteletone --prefix=$(PREFIX)
|
2006-04-03 20:14:51 -04:00
|
|
|
./build/buildlib.sh . install srtp.tgz --prefix=$(PREFIX) --enable-pic
|
2006-02-13 14:51:17 -05:00
|
|
|
rm build/freeswitch.env
|
2006-01-14 13:52:11 -05:00
|
|
|
|
2005-12-20 18:17:30 -05:00
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
modules: $(NAME)
|
2006-02-14 11:42:26 -05:00
|
|
|
@if [ ! -f $(PWD)/modules.conf ] ; then cp $(PWD)/modules.conf.in $(PWD)/modules.conf ; fi
|
2005-11-12 16:27:19 -05:00
|
|
|
@echo making modules
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 14:51:17 -05: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)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env BASE "$(PWD)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)"
|
2006-03-05 15:30:12 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)"
|
2006-02-13 14:51:17 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch"
|
2006-02-14 12:06:15 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)"
|
2006-02-13 14:51:17 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
|
|
|
@cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(PWD) $$i || exit 1; done
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2005-11-12 16:27:19 -05:00
|
|
|
|
|
|
|
modclean:
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 14:51:17 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
2006-03-05 18:44:04 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)"
|
2006-02-13 14:51:17 -05:00
|
|
|
@cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(PWD) $$i clean || exit 1; done
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2005-12-28 00:17:21 -05:00
|
|
|
|
2006-01-30 15:13:24 -05:00
|
|
|
everything: install install_mod
|
2006-01-05 16:03:22 -05:00
|
|
|
|
|
|
|
installall: install install_mod
|
|
|
|
|
|
|
|
wayclean: clean modclean
|
|
|
|
|
2006-01-03 17:36:56 -05:00
|
|
|
modwipe:
|
|
|
|
rm -f $(PREFIX)/mod/*.so
|
2005-11-12 16:27:19 -05:00
|
|
|
|
2005-12-28 10:42:49 -05:00
|
|
|
install_mod: modules
|
2005-11-12 16:27:19 -05:00
|
|
|
@echo Installing $(NAME)
|
2006-02-28 16:21:48 -05:00
|
|
|
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db $(PREFIX)/log $(PREFIX)/bin $(PREFIX)/scripts
|
2006-03-07 21:38:38 -05:00
|
|
|
@if [ ! -f $(PREFIX)/conf/freeswitch.conf ] ; then /bin/cp -p conf/freeswitch.conf $(PREFIX)/conf/; fi
|
2006-01-27 13:37:54 -05:00
|
|
|
@if [ -f .libs/$(NAME) ] ; then /bin/cp -p .libs/$(NAME) $(PREFIX)/bin ; else /bin/cp -p ./$(NAME) $(PREFIX)/bin ; fi
|
2005-11-12 16:27:19 -05:00
|
|
|
@echo Installing Modules
|
2006-02-13 14:56:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2006-02-13 14:51:17 -05:00
|
|
|
@./build/addenv.sh build/freeswitch.env PREFIX "$(PREFIX)"
|
2006-03-05 15:30:12 -05: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)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env BASE "$(PWD)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env OSARCH "$(OSARCH)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env SOLINK "$(SOLINK)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch"
|
|
|
|
@./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)"
|
|
|
|
@./build/addenv.sh build/freeswitch.env CC "$(CC)"
|
2006-03-07 21:38:38 -05:00
|
|
|
@cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(PWD) $$i install || exit 1; done
|
2006-03-05 15:32:01 -05:00
|
|
|
@rm -f build/freeswitch.env
|
2005-11-12 16:27:19 -05:00
|
|
|
@echo done
|
2006-03-05 15:30:12 -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
|
2006-01-25 23:21:06 -05:00
|
|
|
rm -fr .depend `find . -name .complete`
|