M Makefile.moddir_rules => Makefile.moddir_rules +1 -1
@@ 29,7 29,7 @@ include $(ASTTOPDIR)/Makefile.rules
# Use MODULE_EXCLUDE to specify additional modules to exclude.
ifneq ($(MODULE_PREFIX),)
- ALL_C_MODS:=
+ ALL_C_MODS:=$(MODS_C_ADDITIONAL)
ALL_CC_MODS:=
ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c)))
ALL_CC_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.cc,%,$(wildcard $(p)_*.cc)))
M apps/Makefile => apps/Makefile +20 -0
@@ 15,6 15,8 @@ MODULE_PREFIX=app
MENUSELECT_CATEGORY=APPS
MENUSELECT_DESCRIPTION=Applications
+MODS_C_ADDITIONAL=app_voicemail_imapstorage app_voicemail_odbcstorage
+
MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
@@ 25,6 27,24 @@ endif
all: _all
+add_depends_cmd = sed -i -e '/^\/\*\*\* MODULEINFO/a\\t<depend>$(1)<\/depend>'
+app_voicemail_imapstorage.c: app_voicemail.c
+ cp $< $@
+ $(call add_depends_cmd,imap_tk) $@
+ $(call add_depends_cmd,openssl) $@
+ cp app_voicemail.exports.in app_voicemail_imapstorage.exports.in
+app_voicemail_odbcstorage.c: app_voicemail.c
+ cp $< $@
+ $(call add_depends_cmd,unixodbc) $@
+ cp app_voicemail.exports.in app_voicemail_odbcstorage.exports.in
+
+dist-clean::
+ rm -f app_voicemail_*.c
+ rm -f app_voicemail_*.exports.in
+
+app_voicemail_imapstorage.o: _ASTCFLAGS+=-DIMAP_STORAGE
+app_voicemail_odbcstorage.o: _ASTCFLAGS+=-DODBC_STORAGE
+
include $(ASTTOPDIR)/Makefile.moddir_rules
$(call MOD_ADD_C,app_confbridge,$(wildcard confbridge/*.c))