Changing any Menuselect option in the `Compiler Flags` section causes a full rebuild of the Asterisk source tree. Every enabled option causes a #define to be added to buildopts.h, thus breaking ccache caching for every source file that includes "asterisk.h". In most cases each option only applies to one or two files. Now we only define those options for the specific sources which use them, this causes much better cache matching when working with multiple builds. For example testing code with an without MALLOC_DEBUG will now use just over half the ccache size, only main/astmm.o will have two builds cached instead of every file. Reorder main/Makefile so _ASTCFLAGS set on specific object files are all together, sorted by filename. Stop adding -DMALLOC_DEBUG to CFLAGS of bundled pjproject, this define is no longer used by any header so only serves to break cache. The only code change is a slight adjustment to how main/astmm.c is initialized. Initialization functions always exist so main/asterisk.c can call them unconditionally. Additionally rename the astmm initialization functions so they are not exported. Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
43 lines
1.3 KiB
Makefile
43 lines
1.3 KiB
Makefile
#
|
|
# Asterisk -- An open source telephony toolkit.
|
|
#
|
|
# Makefile for channel drivers
|
|
#
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
|
#
|
|
# This program is free software, distributed under the terms of
|
|
# the GNU General Public License
|
|
#
|
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
|
|
|
|
MODULE_PREFIX=chan
|
|
MENUSELECT_CATEGORY=CHANNELS
|
|
MENUSELECT_DESCRIPTION=Channel Drivers
|
|
|
|
all: _all
|
|
|
|
include $(ASTTOPDIR)/Makefile.moddir_rules
|
|
|
|
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
|
LIBS+= -lres_monitor.so
|
|
endif
|
|
|
|
$(call MOD_ADD_C,chan_iax2,$(wildcard iax2/*.c))
|
|
$(call MOD_ADD_C,chan_sip,$(wildcard sip/*.c))
|
|
$(call MOD_ADD_C,chan_pjsip,$(wildcard pjsip/*.c))
|
|
$(call MOD_ADD_C,chan_dahdi,$(wildcard dahdi/*.c) sig_analog.c sig_pri.c sig_ss7.c)
|
|
$(call MOD_ADD_C,chan_misdn,misdn_config.c misdn/isdn_lib.c misdn/isdn_msg_parser.c)
|
|
|
|
chan_dahdi.o: _ASTCFLAGS+=$(call get_menuselect_cflags,LOTS_OF_SPANS)
|
|
chan_mgcp.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
|
|
chan_unistim.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
|
|
chan_phone.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
|
|
chan_sip.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
|
|
|
|
chan_misdn.o: _ASTCFLAGS+=-Imisdn
|
|
misdn_config.o: _ASTCFLAGS+=-Imisdn
|
|
misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
|
|
|
|
$(call MOD_ADD_C,chan_oss,console_video.c vgrabbers.c console_board.c)
|