asterisk/apps/Makefile

64 lines
2.6 KiB
Makefile
Raw Normal View History

#
# Asterisk -- An open source telephony toolkit.
#
# Makefile for PBX applications
#
# Copyright (C) 1999-2006, Digium, Inc.
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
Merged revisions 93180 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html, rizzo brought up some issues related to the way that the metadata required for menuselect and the rest of the build system is extracted from the source files. Since I had a few hours to kill on an airplane today, I decided to improve this situation... so now the system caches the extracted metadata and uses it to build the menuselect 'tree' as much as it can. The result of this is that when a single source file is changed, only the metadata for that file needs to be extracted again, and the rest is used from the cache files. I also reduced the number of forked processes required to do the metadata extraction; it was actually possible to do most of what we needed in the Makefiles themselves without using any shell scripts at all! On my laptop, these changes resulted in an 80% decrease in the time required for the 'menuselect.makeopts' automatic check to occur after editing a single source file. While doing this work I also cleaned up a few minor things in the Makefiles, adding a check for 'awk' to the configure script and changed all remaining places we use 'grep' or 'awk' to use the ones found by the configure script, and changed the 'prep_tarball' script to build the menuselect metadata so that tarballs of Asterisk will include it and won't require the user to wait while it is extracted after unpacking. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:25:35 +00:00
MODULE_PREFIX=app
MENUSELECT_CATEGORY=APPS
MENUSELECT_DESCRIPTION=Applications
MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
all: _all
include $(ASTTOPDIR)/Makefile.moddir_rules
.app_voicemail.moduleinfo: app_voicemail.c
@echo "<member name=\"app_voicemail\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
echo "<support_level>core</support_level>" >> $@
echo "<defaultenabled>yes</defaultenabled>" >> $@
echo "<use type=\"module\">res_adsi</use>" >> $@
echo "<use type=\"module\">res_smdi</use>" >> $@
echo "</member>" >> $@
.app_voicemail_imap.moduleinfo: app_voicemail_imap.c
@echo "<member name=\"app_voicemail_imap\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
echo "<support_level>core</support_level>" >> $@
echo "<defaultenabled>no</defaultenabled>" >> $@
echo "<depend>imap_tk</depend>" >> $@
echo "<use type=\"module\">res_adsi</use>" >> $@
echo "<use type=\"module\">res_smdi</use>" >> $@
echo "</member>" >> $@
.app_voicemail_odbc.moduleinfo: app_voicemail_odbc.c
@echo "<member name=\"app_voicemail_odbc\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
echo "<support_level>core</support_level>" >> $@
echo "<defaultenabled>no</defaultenabled>" >> $@
echo "<depend>generic_odbc</depend>" >> $@
echo "<use type=\"module\">res_adsi</use>" >> $@
echo "<use type=\"module\">res_smdi</use>" >> $@
echo "</member>" >> $@
$(call MOD_ADD_C,app_confbridge,$(wildcard confbridge/*.c))
app_confbridge.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_meetme.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_minivm.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_voicemail.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DFILE_STORAGE
app_voicemail_odbc.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DODBC_STORAGE
app_voicemail_imap.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DIMAP_STORAGE
app_while.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_ael_share.so -lres_monitor.so -lres_speech.so
LIBS+= -lres_smdi.so
endif