[asterisk-commits] branch oej/metermaids-trunk r35986 - in /team/oej/metermaids-trunk: ./ agi/ a...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 26 01:05:44 MST 2006


Author: oej
Date: Mon Jun 26 03:05:43 2006
New Revision: 35986

URL: http://svn.digium.com/view/asterisk?rev=35986&view=rev
Log:
Update, reset automerge

Added:
    team/oej/metermaids-trunk/Makefile.rules
      - copied unchanged from r35965, trunk/Makefile.rules
    team/oej/metermaids-trunk/codecs/codec_zap.c
      - copied unchanged from r35965, trunk/codecs/codec_zap.c
Removed:
    team/oej/metermaids-trunk/build_tools/Makefile
    team/oej/metermaids-trunk/build_tools/menuselect.c
    team/oej/metermaids-trunk/build_tools/menuselect.h
    team/oej/metermaids-trunk/build_tools/menuselect_curses.c
    team/oej/metermaids-trunk/mxml/
Modified:
    team/oej/metermaids-trunk/   (props changed)
    team/oej/metermaids-trunk/Makefile
    team/oej/metermaids-trunk/agi/Makefile
    team/oej/metermaids-trunk/apps/Makefile
    team/oej/metermaids-trunk/apps/app_flash.c
    team/oej/metermaids-trunk/apps/app_meetme.c
    team/oej/metermaids-trunk/apps/app_queue.c
    team/oej/metermaids-trunk/apps/app_rpt.c
    team/oej/metermaids-trunk/apps/app_zapbarge.c
    team/oej/metermaids-trunk/apps/app_zapras.c
    team/oej/metermaids-trunk/apps/app_zapscan.c
    team/oej/metermaids-trunk/build_tools/menuselect-deps.in
    team/oej/metermaids-trunk/build_tools/prep_moduledeps
    team/oej/metermaids-trunk/cdr/Makefile
    team/oej/metermaids-trunk/channel.c
    team/oej/metermaids-trunk/channels/Makefile
    team/oej/metermaids-trunk/channels/chan_agent.c
    team/oej/metermaids-trunk/channels/chan_iax2.c
    team/oej/metermaids-trunk/channels/chan_misdn.c
    team/oej/metermaids-trunk/channels/chan_sip.c
    team/oej/metermaids-trunk/channels/chan_skinny.c
    team/oej/metermaids-trunk/channels/chan_zap.c
    team/oej/metermaids-trunk/channels/h323/Makefile
    team/oej/metermaids-trunk/channels/misdn/isdn_lib.c
    team/oej/metermaids-trunk/codecs/Makefile
    team/oej/metermaids-trunk/codecs/codec_g726.c
    team/oej/metermaids-trunk/codecs/codec_gsm.c
    team/oej/metermaids-trunk/codecs/codec_ilbc.c
    team/oej/metermaids-trunk/codecs/codec_lpc10.c
    team/oej/metermaids-trunk/codecs/codec_speex.c
    team/oej/metermaids-trunk/configs/indications.conf.sample
    team/oej/metermaids-trunk/configs/queues.conf.sample
    team/oej/metermaids-trunk/configure
    team/oej/metermaids-trunk/configure.ac
    team/oej/metermaids-trunk/doc/   (props changed)
    team/oej/metermaids-trunk/doc/video.txt
    team/oej/metermaids-trunk/formats/Makefile
    team/oej/metermaids-trunk/formats/format_ogg_vorbis.c
    team/oej/metermaids-trunk/funcs/Makefile
    team/oej/metermaids-trunk/include/asterisk/autoconfig.h.in
    team/oej/metermaids-trunk/include/asterisk/translate.h
    team/oej/metermaids-trunk/makeopts.in
    team/oej/metermaids-trunk/manager.c
    team/oej/metermaids-trunk/pbx/Makefile
    team/oej/metermaids-trunk/res/Makefile
    team/oej/metermaids-trunk/res/res_musiconhold.c
    team/oej/metermaids-trunk/res/res_snmp.c
    team/oej/metermaids-trunk/rtp.c
    team/oej/metermaids-trunk/sounds/Makefile
    team/oej/metermaids-trunk/translate.c
    team/oej/metermaids-trunk/udptl.c
    team/oej/metermaids-trunk/utils/Makefile

Propchange: team/oej/metermaids-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/metermaids-trunk/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Mon Jun 26 03:05:43 2006
@@ -1,0 +1,2 @@
+menuselect	http://svn.digium.com/svn/menuselect/trunk
+mxml		http://svn.digium.com/svn/mxml/trunk

Propchange: team/oej/metermaids-trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 26 03:05:43 2006
@@ -16,6 +16,7 @@
 testexpr2
 makeopts
 menuselect.makeopts
+menuselect.makedeps
 config.status
 config.log
 makeopts.xml

Propchange: team/oej/metermaids-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun 26 03:05:43 2006
@@ -1,1 +1,1 @@
-/trunk:1-35234
+/trunk:1-35965

Modified: team/oej/metermaids-trunk/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/Makefile?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/Makefile (original)
+++ team/oej/metermaids-trunk/Makefile Mon Jun 26 03:05:43 2006
@@ -12,8 +12,6 @@
 #
 
 .EXPORT_ALL_VARIABLES:
-
-.PHONY: sounds
 
 # Create OPTIONS variable
 OPTIONS=
@@ -123,6 +121,7 @@
 
 ifneq ($(wildcard menuselect.makeopts),)
   include menuselect.makeopts
+  include menuselect.makedeps
 endif
 
 ifneq ($(wildcard makeopts),)
@@ -133,8 +132,7 @@
 MOD_SUBDIR_CFLAGS=-I../include -I..
 OTHER_SUBDIR_CFLAGS=-I../include -I..
 
-ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-  ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
+ifeq ($(or $(findstring dont-optimize,$(MAKECMDGOALS)),$(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))),)
 # More GSM codec optimization
 # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
 # which support MMX instructions.  This should be newer pentiums,
@@ -143,12 +141,6 @@
 
 # Tell gcc to optimize the code
 OPTIMIZE+=-O6
-  else
-    # Stack backtraces, while useful for debugging, are incompatible with optimizations
-    ifeq ($(OSARCH),Linux)
-      CFLAGS+=-DSTACK_BACKTRACES
-    endif
-  endif
 else
   # Stack backtraces, while useful for debugging, are incompatible with optimizations
   ifeq ($(OSARCH),Linux)
@@ -208,7 +200,9 @@
 endif
 
 ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
+ifneq ($(OPTIMIZE),)
 ASTCFLAGS+=$(OPTIMIZE)
+endif
 
 ifeq ($(AST_DEVMODE),yes)
   ASTCFLAGS+=-Werror -Wunused
@@ -235,9 +229,6 @@
   BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
   ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
-  ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
-    ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
-  endif
 endif # FreeBSD
 
 ifeq ($(OSARCH),NetBSD)
@@ -269,9 +260,16 @@
 
 ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
 
-MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs
-OTHER_SUBDIRS=utils agi
+MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs
+OTHER_SUBDIRS:=utils agi
 SUBDIRS:=$(MOD_SUBDIRS) $(OTHER_SUBDIRS)
+SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
+SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
+SUBDIRS_CLEAN_DEPEND:=$(SUBDIRS:%=%-clean-depend)
+MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend)
+OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend)
+SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND)
+SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
 
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
 	translate.o file.o pbx.o cli.o md5.o term.o \
@@ -303,9 +301,9 @@
 endif
 
 ifeq ($(OSARCH),Linux)
-  LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv  #-lnjamd
+  LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv  #-lnjamd
 else
-  LIBS+=$(EDITLINE_LIBS) -lm
+  LIBS+=$(EDITLINE_LIB) -lm
 endif
 
 ifeq ($(OSARCH),Darwin)
@@ -333,11 +331,11 @@
 endif
 
 ifeq ($(OSARCH),NetBSD)
-  LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
+  LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
 endif
 
 ifeq ($(OSARCH),OpenBSD)
-  LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
+  LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
 endif
 
 ifeq ($(OSARCH),SunOS)
@@ -368,7 +366,13 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
+
+$(MOD_SUBDIRS):
+	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
+
+$(OTHER_SUBDIRS):
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -386,8 +390,8 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: build_tools/menuselect makeopts.xml
-	@build_tools/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
+menuselect.makeopts: menuselect/menuselect makeopts.xml
+	@menuselect/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
 
 #ifneq ($(wildcard tags),)
 ctags: tags
@@ -468,6 +472,8 @@
 	fi
 	@rm -f $@.tmp
 
+channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
+
 asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
 	build_tools/make_build_h > include/asterisk/build.h.tmp
 	if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
@@ -480,36 +486,38 @@
 muted: muted.o
 	$(CC) $(AUDIO_LIBS) -o muted muted.o
 
-subdirs: 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C utils
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C agi
-
-clean-depend:
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
-	rm -f .depend .tags-depend
-
-clean: clean-depend
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
+$(SUBDIRS_CLEAN_DEPEND):
+	@$(MAKE) -C $(@:-clean-depend=) clean-depend
+
+$(SUBDIRS_CLEAN):
+	@$(MAKE) -C $(@:-clean=) clean
+
+clean-depend: $(SUBDIRS_CLEAN_DEPEND)
+
+clean: $(SUBDIRS_CLEAN) clean-depend
 	rm -f *.o *.so asterisk
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
 	rm -f include/asterisk/version.h
 	rm -f .tags-sources tags TAGS
+	rm -f .depend .tags-depend
 	@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
-	$(MAKE) -C db1-ast clean
-	$(MAKE) -C stdtime clean
+	@$(MAKE) -C db1-ast clean
+	@$(MAKE) -C stdtime clean
+	@$(MAKE) -C menuselect clean
 
 distclean: dist-clean
 
 dist-clean: clean
-	$(MAKE) -C mxml clean
-	$(MAKE) -C build_tools dist-clean
-	$(MAKE) -C sounds dist-clean
-	rm -f menuselect.makeopts makeopts makeopts.xml
+	@$(MAKE) -C mxml clean
+	@$(MAKE) -C menuselect dist-clean
+	@$(MAKE) -C sounds dist-clean
+	rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
 	rm -f config.log config.status
+	rm -rf autom4te.cache
 	rm -f include/autoconfig.h
 	rm -f include/asterisk/buildopts.h
+	rm -rf doc/api
 
 datafiles: all
 	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
@@ -559,7 +567,7 @@
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
 	if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
 	if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
-	ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
+	$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
 	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
 	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
@@ -586,8 +594,8 @@
 	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
 	$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
 
-install-subdirs:
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
+$(SUBDIRS_INSTALL):
+	@$(MAKE) -C $(@:-install=) install
 
 NEWMODS=$(notdir $(wildcard */*.so))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -610,7 +618,7 @@
 		echo " WARNING WARNING WARNING" ;\
 	fi
 
-install: all datafiles bininstall install-subdirs
+install: all datafiles bininstall $(SUBDIRS_INSTALL)
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
@@ -643,26 +651,26 @@
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
 	for x in configs/*.adsi; do \
 		if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \
-			$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
+			$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \
 		fi ; \
 	done
 
 samples: adsi
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
 	for x in configs/*.sample; do \
-		if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
+		if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \
 			if [ "$(OVERWRITE)" = "y" ]; then \
-				if cmp -s $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $$x ; then \
+				if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \
 					echo "Config file $$x is unchanged"; \
 					continue; \
 				fi ; \
-				mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
+				mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \
 			else \
 				echo "Skipping config file $$x"; \
 				continue; \
 			fi ;\
 		fi ; \
-		$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
+		$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\
 	done
 	if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
 		( \
@@ -772,29 +780,33 @@
 
 valgrind: dont-optimize
 
-depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
-	@for x in $(OTHER_SUBDIRS); do CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
+$(MOD_SUBDIRS_DEPEND):
+	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
+
+$(OTHER_SUBDIRS_DEPEND):
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
+
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h $(SUBDIRS_DEPEND)
 
 .depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
 	build_tools/mkdep $(CFLAGS) $(wildcard *.c)
 
 .tags-depend:
 	@echo -n ".tags-depend: " > $@
-	@find . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
-	@find . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
-	@find $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
-	@find $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
-	@find include -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
+	@$(FIND) . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
+	@$(FIND) $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
+	@$(FIND) include -name \*.h -printf "\t%p \\\\\n" >> $@
 	@echo >> $@
 
 .tags-sources:
 	@rm -f $@
-	@find . -maxdepth 1 -name \*.c -print >> $@
-	@find . -maxdepth 1 -name \*.h -print >> $@
-	@find $(SUBDIRS) -name \*.c -print >> $@
-	@find $(SUBDIRS) -name \*.h -print >> $@
-	@find include -name \*.h -print >> $@
+	@$(FIND) . -maxdepth 1 -name \*.c -print >> $@
+	@$(FIND) . -maxdepth 1 -name \*.h -print >> $@
+	@$(FIND) $(SUBDIRS) -name \*.c -print >> $@
+	@$(FIND) $(SUBDIRS) -name \*.h -print >> $@
+	@$(FIND) include -name \*.h -print >> $@
 
 tags: .tags-depend .tags-sources
 	ctags -L .tags-sources -o $@
@@ -805,8 +817,6 @@
 	etags -o $@ `cat .tags-sources`
 
 etags: TAGS
-
-FORCE:
 
 %_env:
 	$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
@@ -827,7 +837,10 @@
 		$(MAKE) defaults.h;\
 	fi
 
-_uninstall:
+$(SUBDIRS_UNINSTALL):
+	@$(MAKE) -C $(@:-uninstall=) uninstall
+
+_uninstall: $(SUBDIRS_UNINSTALL)
 	rm -f $(DESTDIR)$(MODULES_DIR)/*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
@@ -835,7 +848,6 @@
 	rm -rf $(DESTDIR)$(ASTHEADERDIR)
 	rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
 	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
-	for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
 	$(MAKE) -C sounds uninstall
 
 uninstall: _uninstall
@@ -860,11 +872,11 @@
 	rm -rf $(DESTDIR)$(ASTETCDIR)
 	rm -rf $(DESTDIR)$(ASTLOGDIR)
 
-menuselect: build_tools/menuselect makeopts.xml
-	- at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
-	$(MAKE) -C build_tools menuselect
+menuselect: menuselect/menuselect makeopts.xml
+	- at menuselect/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
+
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
+	@CFLAGS="-include ../include/asterisk/autoconfig.h" $(MAKE) -C menuselect menuselect
 
 mxml/libmxml.a:
 	@cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
@@ -873,3 +885,5 @@
 makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
 	@echo "Generating list of available modules ..."
 	@build_tools/prep_moduledeps > $@
+
+.PHONY: menuselect sounds clean clean-depend dist-clean distclean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)

Modified: team/oej/metermaids-trunk/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/agi/Makefile?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/agi/Makefile (original)
+++ team/oej/metermaids-trunk/agi/Makefile Mon Jun 26 03:05:43 2006
@@ -11,6 +11,8 @@
 # the GNU General Public License
 #
 
+.PHONY: clean clean-depend all depend uninstall
+
 AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
 LIBS=
@@ -18,7 +20,7 @@
   LIBS=-lsocket -lnsl ../strcompat.o
 endif
 
-all: depend $(AGIS)
+all: $(AGIS)
 
 install: all
 	mkdir -p $(DESTDIR)$(AGI_DIR)

Modified: team/oej/metermaids-trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/Makefile?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/Makefile (original)
+++ team/oej/metermaids-trunk/apps/Makefile Mon Jun 26 03:05:43 2006
@@ -5,60 +5,24 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at digium.com>
-#
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts
+  include ../menuselect.makedeps
 endif
 
 SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
 
-app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_app_voicemail))
+all: _all
 
-all: $(MODS)
-
-clean-depend:
-	rm -f .depend
-
-clean: clean-depend
-	rm -f *.so *.o
-
-%.so: %.o
-	$(CC) $(SOLINK) -o $@ $<
-
-app_rpt.so: app_rpt.o
-	$(CC) $(SOLINK) -o $@ $< $(ZAPTEL_LIB)
-
-app_rpt.o: app_rpt.c
-	$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
-
-install: all
-	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-	rm -f $(DESTDIR)$(MODULES_DIR)/app_cut.so
-	rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
-	rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
-
-uninstall:
+include ../Makefile.rules
 
 ifeq (SunOS,$(shell uname))
 app_chanspy.so: app_chanspy.o
 	$(CC) $(SOLINK) -o $@ $< -lrt
 endif
-
-ifneq ($(wildcard .depend),)
- include .depend
-endif
-
-depend: .depend
-
-.depend:
-	../build_tools/mkdep $(CFLAGS) `ls *.c`
-
-env:
-	env

Modified: team/oej/metermaids-trunk/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_flash.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_flash.c (original)
+++ team/oej/metermaids-trunk/apps/app_flash.c Mon Jun 26 03:05:43 2006
@@ -38,11 +38,7 @@
 #include <string.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/oej/metermaids-trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_meetme.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_meetme.c (original)
+++ team/oej/metermaids-trunk/apps/app_meetme.c Mon Jun 26 03:05:43 2006
@@ -39,11 +39,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/oej/metermaids-trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_queue.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_queue.c (original)
+++ team/oej/metermaids-trunk/apps/app_queue.c Mon Jun 26 03:05:43 2006
@@ -330,6 +330,7 @@
 #define QUEUE_EMPTY_STRICT 2
 #define ANNOUNCEHOLDTIME_ALWAYS 1
 #define ANNOUNCEHOLDTIME_ONCE 2
+#define QUEUE_EVENT_VARIABLES 3
 
 struct call_queue {
 	ast_mutex_t lock;	
@@ -340,7 +341,7 @@
 	unsigned int monjoin:1;
 	unsigned int dead:1;
 	unsigned int joinempty:2;
-	unsigned int eventwhencalled:1;
+	unsigned int eventwhencalled:2;
 	unsigned int leavewhenempty:2;
 	unsigned int ringinuse:1;
 	unsigned int setinterfacevar:1;
@@ -874,7 +875,11 @@
 	} else if (!strcasecmp(param, "eventmemberstatus")) {
 		q->maskmemberstatus = !ast_true(val);
 	} else if (!strcasecmp(param, "eventwhencalled")) {
-		q->eventwhencalled = ast_true(val);
+		if (strcasecmp(val, "vars")) {
+			q->eventwhencalled = QUEUE_EVENT_VARIABLES;
+		} else {
+			q->eventwhencalled = ast_true(val);
+		}
 	} else if (!strcasecmp(param, "reportholdtime")) {
 		q->reportholdtime = ast_true(val);
 	} else if (!strcasecmp(param, "memberdelay")) {
@@ -964,7 +969,7 @@
 	struct ast_variable *v;
 	struct call_queue *q;
 	struct member *m, *prev_m, *next_m;
-	char *interface;
+	char *interface = NULL;
 	char *tmp, *tmp_name;
 	char tmpbuf[64];	/* Must be longer than the longest queue param name. */
 
@@ -1046,8 +1051,7 @@
 			m->dead = 1;
 	}
 
-	interface = NULL;
-	while (ast_category_browse(member_config, interface))
+	while ((interface = ast_category_browse(member_config, interface)))
 		rt_handle_member_record(q, interface, ast_variable_retrieve(member_config, interface, "penalty"));
 
 	/* Delete all realtime members that have been deleted in DB. */
@@ -1497,6 +1501,41 @@
 	o->stillgoing = 0;
 	ast_hangup(o->chan);
 	o->chan = NULL;
+}
+
+static char *vars2manager(struct ast_channel *chan, char *vars, size_t len)
+{
+	char *tmp = alloca(len);
+
+	if (pbx_builtin_serialize_variables(chan, tmp, len)) {
+		int i, j;
+
+		/* convert "\n" to "\nVariable: " */
+		strcpy(vars, "Variable: ");
+
+		for (i = 0, j = 10; (i < len - 1) && (j < len - 1); i++, j++) {
+			vars[j] = tmp[i];
+
+			if (tmp[i + 1] == '\0')
+				break;
+			if (tmp[i] == '\n') {
+				vars[j] = '\r';
+				vars[++j] = '\n';
+
+				ast_copy_string(&(vars[j]), "Variable: ", len - j);
+				j += 9;
+			}
+		}
+		if (j > len - 1)
+			j = len - 1;
+		vars[j - 2] = '\r';
+		vars[j - 1] = '\n';
+		vars[j] = '\0';
+	} else {
+		/* there are no channel variables; leave it blank */
+		*vars = '\0';
+	}
+	return vars;
 }
 
 static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies)
@@ -1590,21 +1629,23 @@
 		do_hang(tmp);
 		(*busies)++;
 		return 0;
-	} else {
-		if (qe->parent->eventwhencalled) {
-			manager_event(EVENT_FLAG_AGENT, "AgentCalled",
-						"AgentCalled: %s\r\n"
-						"ChannelCalling: %s\r\n"
-						"CallerID: %s\r\n"
-						"CallerIDName: %s\r\n"
-						"Context: %s\r\n"
-						"Extension: %s\r\n"
-						"Priority: %d\r\n",
-						tmp->interface, qe->chan->name,
-						S_OR(tmp->chan->cid.cid_num, "unknown"),
-						S_OR(tmp->chan->cid.cid_name, "unknown"),
-						qe->chan->context, qe->chan->exten, qe->chan->priority);
-		}
+	} else if (qe->parent->eventwhencalled) {
+		char vars[2048];
+
+		manager_event(EVENT_FLAG_AGENT, "AgentCalled",
+					"AgentCalled: %s\r\n"
+					"ChannelCalling: %s\r\n"
+					"CallerID: %s\r\n"
+					"CallerIDName: %s\r\n"
+					"Context: %s\r\n"
+					"Extension: %s\r\n"
+					"Priority: %d\r\n"
+					"%s",
+					tmp->interface, qe->chan->name,
+					tmp->chan->cid.cid_num ? tmp->chan->cid.cid_num : "unknown",
+					tmp->chan->cid.cid_name ? tmp->chan->cid.cid_name : "unknown",
+					qe->chan->context, qe->chan->exten, qe->chan->priority,
+					qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", tmp->interface);
 	}
@@ -2234,6 +2275,7 @@
 	char mixmonargs[1512];
 	struct ast_app *mixmonapp = NULL;
 	char *p;
+	char vars[2048];
 
 	memset(&bridge_config, 0, sizeof(bridge_config));
 	time(&now);
@@ -2382,14 +2424,15 @@
 				ast_log(LOG_WARNING, "Agent on %s hungup on the customer.  They're going to be pissed.\n", peer->name);
 				ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "AGENTDUMP", "%s", "");
 				record_abandoned(qe);
-				if (qe->parent->eventwhencalled) {
+				if (qe->parent->eventwhencalled)
 					manager_event(EVENT_FLAG_AGENT, "AgentDump",
-						      "Queue: %s\r\n"
-						      "Uniqueid: %s\r\n"
-						      "Channel: %s\r\n"
-						      "Member: %s\r\n",
-						      queuename, qe->chan->uniqueid, peer->name, member->interface);
-				}
+							"Queue: %s\r\n"
+							"Uniqueid: %s\r\n"
+							"Channel: %s\r\n"
+							"Member: %s\r\n"
+							"%s",
+							queuename, qe->chan->uniqueid, peer->name, member->interface,
+							qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 				ast_hangup(peer);
 				goto out;
 			} else if (res2) {
@@ -2527,14 +2570,16 @@
 		ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "CONNECT", "%ld|%s", (long)time(NULL) - qe->start, peer->uniqueid);
 		if (qe->parent->eventwhencalled)
 			manager_event(EVENT_FLAG_AGENT, "AgentConnect",
-				      "Queue: %s\r\n"
-				      "Uniqueid: %s\r\n"
-				      "Channel: %s\r\n"
-				      "Member: %s\r\n"
-				      "Holdtime: %ld\r\n"
-				      "BridgedChannel: %s\r\n",
-				      queuename, qe->chan->uniqueid, peer->name, member->interface,
-				      (long) time(NULL) - qe->start,peer->uniqueid);
+					"Queue: %s\r\n"
+					"Uniqueid: %s\r\n"
+					"Channel: %s\r\n"
+					"Member: %s\r\n"
+					"Holdtime: %ld\r\n"
+					"BridgedChannel: %s\r\n"
+					"%s",
+					queuename, qe->chan->uniqueid, peer->name, member->interface,
+					(long)time(NULL) - qe->start, peer->uniqueid,
+					qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 		ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
 		ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
 		time(&callstart);
@@ -2550,28 +2595,32 @@
 				      (long) (callstart - qe->start), (long) (time(NULL) - callstart));
 			if (qe->parent->eventwhencalled)
 				manager_event(EVENT_FLAG_AGENT, "AgentComplete",
-					      "Queue: %s\r\n"
-					      "Uniqueid: %s\r\n"
-					      "Channel: %s\r\n"
-					      "Member: %s\r\n"
-					      "HoldTime: %ld\r\n"
-					      "TalkTime: %ld\r\n"
-					      "Reason: caller\r\n",
-					      queuename, qe->chan->uniqueid, peer->name, member->interface,
-					      (long) (callstart - qe->start), (long) (time(NULL) - callstart));
+						"Queue: %s\r\n"
+						"Uniqueid: %s\r\n"
+						"Channel: %s\r\n"
+						"Member: %s\r\n"
+						"HoldTime: %ld\r\n"
+						"TalkTime: %ld\r\n"
+						"Reason: caller\r\n"
+						"%s",
+						queuename, qe->chan->uniqueid, peer->name, member->interface,
+						(long)(callstart - qe->start), (long)(time(NULL) - callstart),
+						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 		} else {
 			ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "COMPLETEAGENT", "%ld|%ld",
 				      (long) (callstart - qe->start), (long) (time(NULL) - callstart));
 			if (qe->parent->eventwhencalled)
 				manager_event(EVENT_FLAG_AGENT, "AgentComplete",
-					      "Queue: %s\r\n"
-					      "Uniqueid: %s\r\n"
-					      "Channel: %s\r\n"
-					      "HoldTime: %ld\r\n"
-					      "TalkTime: %ld\r\n"
-					      "Reason: agent\r\n",
-					      queuename, qe->chan->uniqueid, peer->name, (long)(callstart - qe->start),
-					      (long) (time(NULL) - callstart));
+						"Queue: %s\r\n"
+						"Uniqueid: %s\r\n"
+						"Channel: %s\r\n"
+						"HoldTime: %ld\r\n"
+						"TalkTime: %ld\r\n"
+						"Reason: agent\r\n"
+						"%s",
+						queuename, qe->chan->uniqueid, peer->name, (long)(callstart - qe->start),
+						(long)(time(NULL) - callstart),
+						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 		}
 
 		if (bridge != AST_PBX_NO_HANGUP_PEER)
@@ -3697,8 +3746,10 @@
 			else
 				ast_log(LOG_DEBUG, "XXX Leaking a little memory :( XXX\n");
 		} else {
+			ast_mutex_lock(&q->lock);
 			for (cur = q->members; cur; cur = cur->next)
 				cur->status = ast_device_state(cur->interface);
+			ast_mutex_unlock(&q->lock);
 		}
 	}
 	AST_LIST_TRAVERSE_SAFE_END;

Modified: team/oej/metermaids-trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_rpt.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_rpt.c (original)
+++ team/oej/metermaids-trunk/apps/app_rpt.c Mon Jun 26 03:05:43 2006
@@ -118,6 +118,7 @@
 
 /*** MODULEINFO
 	<depend>zaptel</depend>
+	<depend>tonezone</depend>
 	<defaultenabled>no</defaultenabled>
  ***/
 
@@ -221,8 +222,8 @@
 #include <sys/ioctl.h>
 #include <sys/io.h>
 #include <math.h>
+#include <zaptel.h>
 #include <tonezone.h>
-#include <linux/zaptel.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 

Modified: team/oej/metermaids-trunk/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_zapbarge.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_zapbarge.c (original)
+++ team/oej/metermaids-trunk/apps/app_zapbarge.c Mon Jun 26 03:05:43 2006
@@ -45,12 +45,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/oej/metermaids-trunk/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_zapras.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_zapras.c (original)
+++ team/oej/metermaids-trunk/apps/app_zapras.c Mon Jun 26 03:05:43 2006
@@ -48,13 +48,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
-
-/* Need some zaptel help here */
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/oej/metermaids-trunk/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/apps/app_zapscan.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/apps/app_zapscan.c (original)
+++ team/oej/metermaids-trunk/apps/app_zapscan.c Mon Jun 26 03:05:43 2006
@@ -44,12 +44,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/oej/metermaids-trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/build_tools/menuselect-deps.in?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/build_tools/menuselect-deps.in (original)
+++ team/oej/metermaids-trunk/build_tools/menuselect-deps.in Mon Jun 26 03:05:43 2006
@@ -11,7 +11,7 @@
 LIBSPEEX=@PBX_LIBSPEEX@
 LIBVORBIS=@PBX_LIBVORBIS@
 NBS=@PBX_LIBNBS@
-OGG=@PBX_LIBOGG@
+LIBOGG=@PBX_LIBOGG@
 OSSAUDIO=@PBX_LIBOSS@
 PGSQL=@PBX_LIBpq@
 QT=@PBX_QT@
@@ -22,7 +22,9 @@
 VPBAPI=@PBX_LIBvpb@
 WIN32=@OSISWIN32@
 ZLIB=@PBX_LIBZLIB@
-ZAPTEL=@PBX_LIBZAPTEL@
+TONEZONE=@PBX_LIBTONEZONE@
+ZAPTEL=@PBX_ZAPTEL@
 LIBGSM=@PBX_LIBgsm@
 IKSEMEL=@PBX_LIBIKSEMEL@
 IXJUSER=@PBX_IXJUSER@
+NETSNMP=@PBX_NETSNMP@

Modified: team/oej/metermaids-trunk/build_tools/prep_moduledeps
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/build_tools/prep_moduledeps?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/build_tools/prep_moduledeps (original)
+++ team/oej/metermaids-trunk/build_tools/prep_moduledeps Mon Jun 26 03:05:43 2006
@@ -52,7 +52,7 @@
 
 echo "<?xml version="1.0"?>"
 echo
-echo "<menu>"
+echo "<menu name=\"Asterisk Module Selection\">"
 rm -f .makeoptstmp
 process_dir apps app APPS Applications
 process_dir cdr cdr CDR "Call Detail Recording"

Modified: team/oej/metermaids-trunk/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/cdr/Makefile?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/cdr/Makefile (original)
+++ team/oej/metermaids-trunk/cdr/Makefile Mon Jun 26 03:05:43 2006
@@ -5,29 +5,18 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at digium.com>
-#
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts
+  include ../menuselect.makedeps
 endif
 
 SELECTED_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
 
-#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
-#This works for even old (2.96) versions of gcc and provides a small boost either way.
-#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
-#So we go lowest common available by gcc and go a step down, still a step up from
-#the default as we now have a better instruction set to work with. - Belgarath
-ifeq ($(PROC),sparc64)
-  PROC=ultrasparc
-  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
-endif
-
-ifneq ($(TDS_LIB),)
+ifneq ($(FREETDS_LIB),)
   ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
     CFLAGS += -DFREETDS_0_63
   else
@@ -39,60 +28,6 @@
   endif
 endif
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+all: _all
 
-all: $(MODS)
-
-install: all
-	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
-uninstall:
-
-clean-depend:
-	rm -f .depend
-
-clean: clean-depend
-	rm -f *.so *.o
-
-%.so : %.o
-	$(CC) $(SOLINK) -o $@ $<
-
-cdr_odbc.so: cdr_odbc.o
-	$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
-
-cdr_odbc.o: cdr_odbc.c
-	$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
-
-cdr_tds.so: cdr_tds.o
-	$(CC) $(SOLINK) -o $@ $< $(TDS_LIB)
-
-cdr_tds.o: cdr_tds.c
-	$(CC) -c -o $@ $(CFLAGS) $(TDS_INCLUDE) $<
-
-cdr_pgsql.so: cdr_pgsql.o
-	$(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)
-
-cdr_pgsql.o: cdr_pgsql.c
-	$(CC) -c -o $@ $(CFLAGS) $(PGSQL_INCLUDE) $<
-
-cdr_sqlite.so: cdr_sqlite.o
-	$(CC) $(SOLINK) -o $@ $< $(SQLITE_LIB)
-
-cdr_sqlite.o: cdr_sqlite.c
-	$(CC) -c -o $@ $(CFLAGS) $(SQLITE_INCLUDE) $<
-
-cdr_radius.so: cdr_radius.o
-	$(CC) $(SOLINK) -o $@ $< $(RADIUSCLIENT_LIB)
-
-cdr_radius.o: cdr_radius.c
-	$(CC) -c -o $@ $(CFLAGS) $(RADIUSCLIENT_INCLUDE) $<
-
-
-ifneq ($(wildcard .depend),)
-  include .depend
-endif
-
-depend: .depend
-
-.depend:
-	../build_tools/mkdep $(CFLAGS) `ls *.c`
+include ../Makefile.rules

Modified: team/oej/metermaids-trunk/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/channel.c?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/channel.c (original)
+++ team/oej/metermaids-trunk/channel.c Mon Jun 26 03:05:43 2006
@@ -38,14 +38,7 @@
 
 #ifdef HAVE_ZAPTEL
 #include <sys/ioctl.h>
-#ifdef __linux__
-#include <linux/zaptel.h>
-#else
 #include <zaptel.h>
-#endif /* __linux__ */
-#ifndef ZT_TIMERPING
-#error "You need newer zaptel!  Please cvs update zaptel"
-#endif
 #endif
 
 #include "asterisk/pbx.h"

Modified: team/oej/metermaids-trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids-trunk/channels/Makefile?rev=35986&r1=35985&r2=35986&view=diff
==============================================================================
--- team/oej/metermaids-trunk/channels/Makefile (original)
+++ team/oej/metermaids-trunk/channels/Makefile Mon Jun 26 03:05:43 2006
@@ -5,14 +5,13 @@
 #
 # Copyright (C) 1999-2006, Digium, Inc.
 #
-# Mark Spencer <markster at digium.com>
-#
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts
+  include ../menuselect.makedeps
 endif
 
 SELECTED_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
@@ -28,11 +27,6 @@
   CHANH323LIB=-ldl
 endif
 
-ifeq ($(PROC),sparc64)
-  PROC=ultrasparc
-  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
-endif
-
 ifeq ($(OSARCH),FreeBSD)
   PTLIB=-lpt_FreeBSD_x86_r
   H323LIB=-lh323_FreeBSD_x86_r
@@ -42,10 +36,6 @@
 ifeq ($(OSARCH),NetBSD)
   PTLIB=-lpt_NetBSD_x86_r
   H323LIB=-lh323_NetBSD_x86_r
-endif
-
-ifeq ($(OSARCH),SunOS)
-  SOLINK+=-lrt
 endif
 
 ifeq ($(wildcard h323/libchanh323.a),)
@@ -66,23 +56,14 @@
   PWLIBDIR=$(HOME)/pwlib
 endif
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
 
-all: $(MODS) 
+all: _all
 
-clean-depend:
-	rm -f .depend
+include ../Makefile.rules
 
-clean: clean-depend
-	rm -f *.so *.o
+clean::
 	rm -f busy.h ringtone.h gentone gentone-ulaw
-
-%.so : %.o
-	$(CC) $(SOLINK) -o $@ $<
-
-ifneq ($(wildcard .depend),)
-  include .depend
-endif
 
 ifneq ($(wildcard h323/Makefile.ast),)
   include h323/Makefile.ast
@@ -92,11 +73,8 @@
   include misdn/Makefile.ast
 endif
 
-gentone: gentone.c
-	$(HOST_CC) -o gentone gentone.c -lm
-
-gentone-ulaw: gentone-ulaw.c
-	$(HOST_CC) -o gentone-ulaw gentone-ulaw.c -lm
+gentone gentone-ulaw: %: %.c
+	$(HOST_CC) -o $@ $< -lm
 
 busy.h: gentone
 	./gentone busy 480 620
@@ -105,43 +83,16 @@
 	./gentone ringtone 440 480
 
 chan_oss.o: chan_oss.c busy.h ringtone.h

[... 11032 lines stripped ...]


More information about the asterisk-commits mailing list