aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-17 19:00:07 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-17 19:00:07 +0000
commit49ec17e59f156dba678f4bd2a0df13a5fe3c7b2d (patch)
tree92993e70c45d75f099f34f109a31e900a661a073 /Makefile
parentf5e86448ae56c343c254a3e31a91200bd954ab1e (diff)
reformulate dependencies in a more correct way
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89389 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 13 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index a6ed5085b..9e97ae14a 100644
--- a/Makefile
+++ b/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
-# 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 ),)
+ # 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))
else
-SUBDIR_DEPS=main res
-main:
- @ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" \
- ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" \
- $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
+ # Windows: we need to build main (i.e. the asterisk dll) first,
+ # followed by res, followed by the other directories, because
+ # dll symbols must be resolved during linking and not at runtime.
+D1:= $(filter-out main,$(MOD_SUBDIRS))
+D1:= $(filter-out res,$(D1))
+$(D1): res
res: main
- @ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" \
- ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" \
- $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
endif
-$(MOD_SUBDIRS): $(SUBDIR_DEPS)
+$(MOD_SUBDIRS):
@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
defaults.h: makeopts