From 3730650b4cb0988d10113dacd1644c72ca7607dc Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 30 Jun 2009 17:04:35 +0000 Subject: [PATCH] Add-ons related build system improvements. Ensure that add-on modules can be embedded, fix up Makefile.moddir_rules to allow module directory Makefiles to more easily specify the modules to be built, and explicitly list the addons modules in its Makefile, since the module names don't follow any pattern. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204415 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile.moddir_rules | 19 +++++++++---------- addons/Makefile | 9 ++++++++- build_tools/embed_modules.xml | 23 +++++++++++++---------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules index 1db15ecb10..9053d2329d 100644 --- a/Makefile.moddir_rules +++ b/Makefile.moddir_rules @@ -38,19 +38,18 @@ include $(ASTTOPDIR)/Makefile.rules ifneq ($(MODULE_PREFIX),) ALL_C_MODS:= - ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c))) 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))) +endif - C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS)) - CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS)) - - # and store in the list of embedded or loadable modules - ifneq ($(findstring $(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),) - EMBEDDED_MODS:=$(C_MODS) $(CC_MODS) - else - LOADABLE_MODS:=$(C_MODS) $(CC_MODS) - endif +C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS)) +CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS)) + +ifneq ($(findstring $(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),) + EMBEDDED_MODS:=$(C_MODS) $(CC_MODS) +else + LOADABLE_MODS:=$(C_MODS) $(CC_MODS) endif # Both C++ and C++ sources need their module name in AST_MODULE diff --git a/addons/Makefile b/addons/Makefile index c937597028..1b2b177248 100644 --- a/addons/Makefile +++ b/addons/Makefile @@ -11,7 +11,6 @@ -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps -MODULE_PREFIX=app bridge cdr cel chan codec format func pbx res test MENUSELECT_CATEGORY=Addons MENUSELECT_DESCRIPTION=Add-ons (See README-addons.txt) @@ -27,6 +26,14 @@ H323OBJS:=ooCmdChannel.o ooLogChan.o ooUtils.o ooGkClient.o context.o \ H323CFLAGS:=-Iooh323c/src -Iooh323c/src/h323 +ALL_C_MODS:=app_addon_sql_mysql \ + app_saycountpl \ + cdr_addon_mysql \ + chan_mobile \ + chan_ooh323 \ + format_mp3 \ + res_config_mysql + all: _all include $(ASTTOPDIR)/Makefile.moddir_rules diff --git a/build_tools/embed_modules.xml b/build_tools/embed_modules.xml index 0e50a9e4db..c38be80319 100644 --- a/build_tools/embed_modules.xml +++ b/build_tools/embed_modules.xml @@ -1,32 +1,35 @@ - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + gnu_ld - + + gnu_ld + + gnu_ld