From 0a6e138eed428c53bb15cdeee670574a5185c160 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 30 Jun 2009 17:04:35 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@204415 f38db490-d61c-443f-a65b-d21fe96a405b --- 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 1db15ecb1..9053d2329 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 c93759702..1b2b17724 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 0e50a9e4d..c38be8031 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 -- cgit v1.2.3