[svn-commits] rizzo: trunk r88587 - /trunk/Makefile.moddir_rules

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 5 11:27:02 CST 2007


Author: rizzo
Date: Mon Nov  5 11:27:02 2007
New Revision: 88587

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88587
Log:
merge two rules with the same right hand;
document a bit what is done here.


Modified:
    trunk/Makefile.moddir_rules

Modified: trunk/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.moddir_rules?view=diff&rev=88587&r1=88586&r2=88587
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ trunk/Makefile.moddir_rules Mon Nov  5 11:27:02 2007
@@ -10,6 +10,13 @@
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
+
+# Makefile rules for building modules.
+
+# In most cases, we set target-specific variables for certain targets
+# (remember that they apply recursively to prerequisites).
+# Also note that we can only set one variable per rule, so we have to
+# repeat the left hand side to set multiple variables.
 
 ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
  ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
@@ -29,9 +36,14 @@
 
 comma:=,
 
-$(addsuffix .o,$(C_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
-$(addsuffix .oo,$(CC_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+# Both C++ and C++ sources need their module name in AST_MODULE
+# We also pass whatever _INCLUDE list is generated by menuselect
+# (they are stored in file 'makeopts')
 
+$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)):	\
+	ASTCFLAGS+= -DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+
+# For loadable modules, pass _LIB and _LDFLAGS from menuselect.
 $(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
 $(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
 $(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))




More information about the svn-commits mailing list