From aa855407636dfbcb68119ac54a669ee083fd109b Mon Sep 17 00:00:00 2001 From: rizzo Date: Mon, 10 Dec 2007 03:50:38 +0000 Subject: Put into Makefile.moddir_rules the common instructions used to generate loadable and embedded module lists. Individual Makefiles now are a lot simpler, possibly as simple as this: -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps MODULE_PREFIX=cdr_ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules and also more flexible because in a single directory we can combine various types of modules (app_, cdr_, func_, ... ) by simply listing them in the MODULE_PREFIX variable. The individual Makefiles can also create list of modules to be excluded by listing them in the variablel MODULE_EXCLUDE (see an example in channels/Makefile). With this change it becomes trivial to integrate a directory with locally created/modified sources into the main build. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92082 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'channels/Makefile') diff --git a/channels/Makefile b/channels/Makefile index 06f45f8dc..1bf461e0f 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -11,8 +11,7 @@ -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps -C_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c))) -CC_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.cc,%,$(wildcard chan_*.cc))) +MODULE_PREFIX=chan_ ifeq ($(OSARCH),OpenBSD) PTLIB=-lpt_OpenBSD_x86_r @@ -36,13 +35,13 @@ ifeq ($(OSARCH),NetBSD) H323LIB=-lh323_NetBSD_x86_r endif +MODULE_EXCLUDE:= ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) - C_MODS:=$(filter-out chan_oss,$(C_MODS)) - C_MODS:=$(filter-out chan_unistim,$(C_MODS)) + MODULE_EXCLUDE+= chan_oss chan_unistim endif ifeq ($(wildcard h323/libchanh323.a),) - CC_MODS:=$(filter-out chan_h323,$(CC_MODS)) + MODULE_EXCLUDE += chan_h323 endif ifndef OPENH323DIR @@ -53,13 +52,6 @@ ifndef PWLIBDIR PWLIBDIR=$(HOME)/pwlib endif -LOADABLE_MODS:=$(C_MODS) $(CC_MODS) - -ifneq ($(findstring channels,$(MENUSELECT_EMBED)),) - EMBEDDED_MODS:=$(LOADABLE_MODS) - LOADABLE_MODS:= -endif - all: _all include $(ASTTOPDIR)/Makefile.moddir_rules -- cgit v1.2.3