Add-ons related build system improvements.
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 30 Jun 2009 17:04:35 +0000 (17:04 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 30 Jun 2009 17:04:35 +0000 (17:04 +0000)
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
addons/Makefile
build_tools/embed_modules.xml

index 1db15ec..9053d23 100644 (file)
@@ -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
index c937597..1b2b177 100644 (file)
@@ -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
index 0e50a9e..c38be80 100644 (file)
@@ -1,32 +1,35 @@
        <category name="MENUSELECT_EMBED" displayname="Module Embedding" positive_output="yes" remove_on_change="main/asterisk">
-               <member name="APPS" displayname="Applications" remove_on_change="apps/*.o">
+               <member name="ADDONS" displayname="Add-ons" remove_on_change="addons/*.o addons/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="BRIDGES" displayname="Bridging Technologies" remove_on_change="bridges/*.o">
+               <member name="APPS" displayname="Applications" remove_on_change="apps/*.o apps/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="CDR" displayname="Call Detail Recording" remove_on_change="cdr/*.o">
+               <member name="BRIDGES" displayname="Bridging Technologies" remove_on_change="bridges/*.o bridges/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="CHANNELS" displayname="Channels" remove_on_change="channels/*.o channels/*/*.o">
+               <member name="CDR" displayname="Call Detail Recording" remove_on_change="cdr/*.o cdr/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="CODECS" displayname="Coders/Decoders" remove_on_change="codecs/*.o codecs/*/*.o codecs/*/*/*.o codecs/*/*.a codecs/*/*/*.a">
+               <member name="CHANNELS" displayname="Channels" remove_on_change="channels/*.o channels/*/*.o channels/*.oo channels/*/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="FORMATS" displayname="File Formats" remove_on_change="formats/*.o">
+               <member name="CODECS" displayname="Coders/Decoders" remove_on_change="codecs/*.o codecs/*/*.o codecs/*/*/*.o codecs/*/*.a codecs/*/*/*.a codecs/*.oo codecs/*/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="FUNCS" displayname="Dialplan Functions" remove_on_change="funcs/*.o">
+               <member name="FORMATS" displayname="File Formats" remove_on_change="formats/*.o formats/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="PBX" displayname="PBX Functionality" remove_on_change="pbx/*.o pbx/*/*.o">
+               <member name="FUNCS" displayname="Dialplan Functions" remove_on_change="funcs/*.o funcs/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="RES" displayname="Resource Modules" remove_on_change="res/*.o res/*/*.o">
+               <member name="PBX" displayname="PBX Functionality" remove_on_change="pbx/*.o pbx/*/*.o pbx/*.oo pbx/*/*.oo">
                        <depend>gnu_ld</depend>
                </member>
-               <member name="TEST" displayname="Test Modules" remove_on_change="tests/*.o">
+               <member name="RES" displayname="Resource Modules" remove_on_change="res/*.o res/*/*.o res/*.oo res/*/*.oo">
+                       <depend>gnu_ld</depend>
+               </member>
+               <member name="TEST" displayname="Test Modules" remove_on_change="tests/*.o tests/*.oo">
                        <depend>gnu_ld</depend>
                </member>
        </category>