mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 15:18:38 +00:00
reformulate dependencies in a more correct way
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
27
Makefile
27
Makefile
@@ -341,29 +341,28 @@ makeopts.embed_rules: menuselect.makeopts
|
|||||||
|
|
||||||
$(SUBDIRS): include/asterisk/version.h include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
|
$(SUBDIRS): include/asterisk/version.h include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
|
||||||
|
|
||||||
# ensure that all module subdirectories are processed before 'main' during
|
|
||||||
# a parallel build, since if there are modules selected to be embedded the
|
|
||||||
# directories containing them must be completed before the main Asterisk
|
|
||||||
# binary can be built
|
|
||||||
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
||||||
|
# Non-windows:
|
||||||
|
# ensure that all module subdirectories are processed before 'main' during
|
||||||
|
# a parallel build, since if there are modules selected to be embedded the
|
||||||
|
# directories containing them must be completed before the main Asterisk
|
||||||
|
# binary can be built
|
||||||
main: $(filter-out main,$(MOD_SUBDIRS))
|
main: $(filter-out main,$(MOD_SUBDIRS))
|
||||||
else
|
else
|
||||||
SUBDIR_DEPS=main res
|
# Windows: we need to build main (i.e. the asterisk dll) first,
|
||||||
main:
|
# followed by res, followed by the other directories, because
|
||||||
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" \
|
# dll symbols must be resolved during linking and not at runtime.
|
||||||
ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" \
|
D1:= $(filter-out main,$(MOD_SUBDIRS))
|
||||||
$(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
D1:= $(filter-out res,$(D1))
|
||||||
|
|
||||||
|
$(D1): res
|
||||||
res: main
|
res: main
|
||||||
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" \
|
|
||||||
ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" \
|
|
||||||
$(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(MOD_SUBDIRS): $(SUBDIR_DEPS)
|
$(MOD_SUBDIRS):
|
||||||
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
||||||
|
|
||||||
$(OTHER_SUBDIRS): $(SUBDIR_DEPS)
|
$(OTHER_SUBDIRS):
|
||||||
@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
||||||
|
|
||||||
defaults.h: makeopts
|
defaults.h: makeopts
|
||||||
|
Reference in New Issue
Block a user