mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 03:08:45 +00:00
merge two rules with the same right hand;
document a bit what is done here. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -11,6 +11,13 @@
|
|||||||
# the GNU General Public License
|
# 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)),)
|
ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
|
||||||
ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
|
ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
|
||||||
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
|
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
|
||||||
@@ -29,9 +36,14 @@ include $(ASTTOPDIR)/Makefile.rules
|
|||||||
|
|
||||||
comma:=,
|
comma:=,
|
||||||
|
|
||||||
$(addsuffix .o,$(C_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
|
||||||
$(addsuffix .oo,$(CC_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
|
# 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): ASTCFLAGS+=-fPIC
|
||||||
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
|
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
|
||||||
$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
|
$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
|
||||||
|
Reference in New Issue
Block a user