Merge "ARI: Run 'make ari-stubs'"
[asterisk/asterisk.git] / apps / Makefile
index 01d70c6..589293c 100644 (file)
@@ -1,6 +1,6 @@
 #
-# Asterisk -- A telephony toolkit for Linux.
-# 
+# Asterisk -- An open source telephony toolkit.
+#
 # Makefile for PBX applications
 #
 # Copyright (C) 1999-2006, Digium, Inc.
@@ -9,19 +9,33 @@
 # the GNU General Public License
 #
 
-ifneq ($(wildcard ../menuselect.makeopts),)
-  include ../menuselect.makeopts
-endif
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
-SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
+MODULE_PREFIX=app
+MENUSELECT_CATEGORY=APPS
+MENUSELECT_DESCRIPTION=Applications
 
-MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
+MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
+ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
+  MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
+endif
+ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
+  MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
+endif
 
 all: _all
 
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
+
+$(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)
+app_while.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
 
-ifeq (SunOS,$(shell uname))
-app_chanspy.so: app_chanspy.o
-       $(CC) $(SOLINK) -o $@ $< -lrt
+ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
+  LIBS+= -lres_ael_share.so -lres_monitor.so -lres_speech.so
+  LIBS+= -lres_smdi.so
 endif