Index: Makefile =================================================================== --- Makefile (revision 43240) +++ Makefile (working copy) @@ -194,7 +194,8 @@ ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS) -MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs main +MOD_SUBDIRS_MODS:=res channels pbx apps codecs formats cdr func +MOD_SUBDIRS:=$(MOD_SUBDIRS_MODS) main OTHER_SUBDIRS:=utils agi SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS) SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install) @@ -270,7 +271,7 @@ # 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: $(MOD_SUBDIRS_MODS) $(MOD_SUBDIRS): @CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all @@ -646,7 +647,7 @@ menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts @unset CC LD AR RANLIB && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent" -menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml +menuselect-tree: $(foreach dir,$(MOD_SUBDIRS_DEPEND),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml @echo "Generating input for menuselect ..." @build_tools/prep_moduledeps > $@