mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines Ensure that user-provided CFLAGS and LDFLAGS are honored. This commit changes the build system so that user-provided flags (in ASTCFLAGS and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided by the build system itself, so that the user can effectively override the build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now be provided *either* in the environment before running 'make', or as variable assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS is no longer necessary, so they are no longer documented, but are still supported so as not to break existing build systems that supply them when building Asterisk. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
78
Makefile
78
Makefile
@@ -13,29 +13,23 @@
|
|||||||
|
|
||||||
# All Makefiles use the following variables:
|
# All Makefiles use the following variables:
|
||||||
#
|
#
|
||||||
# ASTCFLAGS - compiler options
|
# ASTCFLAGS - compiler options provided by the user (if any)
|
||||||
# ASTLDFLAGS - linker flags (not libraries)
|
# _ASTCFLAGS - compiler options provided by the build system
|
||||||
|
# ASTLDFLAGS - linker flags (not libraries) provided by the user (if any)
|
||||||
|
# _ASTLDFLAGS - linker flags (not libraries) provided by the build system
|
||||||
# LIBS - additional libraries, at top-level for all links,
|
# LIBS - additional libraries, at top-level for all links,
|
||||||
# on a single object just for that object
|
# on a single object just for that object
|
||||||
# SOLINK - linker flags used only for creating shared objects (.so files),
|
# SOLINK - linker flags used only for creating shared objects (.so files),
|
||||||
# used for all .so links
|
# used for all .so links
|
||||||
#
|
#
|
||||||
# Initial values for ASTCFLAGS and ASTLDFLAGS can be specified in the
|
# Values for ASTCFLAGS and ASTLDFLAGS can be specified in the
|
||||||
# environment when running make, as follows:
|
# environment when running make, as follows:
|
||||||
#
|
#
|
||||||
# $ ASTCFLAGS="-Werror" make ...
|
# $ ASTCFLAGS="-Werror" make ...
|
||||||
#
|
#
|
||||||
# note that this is different from
|
# or as a variable value on the make command line itself:
|
||||||
#
|
#
|
||||||
# $ make ASTCFLAGS="-Werror" ...
|
# $ make ASTCFLAGS="-Werror" ...
|
||||||
#
|
|
||||||
# If you need to pass compiler/linker flags as 'make' variables, please use
|
|
||||||
#
|
|
||||||
# $ make COPTS="..." LDOPTS="..." ...
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# You can add the path of local module subdirs from the command line with
|
|
||||||
# make LOCAL_MOD_SUBDIRS= ....
|
|
||||||
|
|
||||||
export ASTTOPDIR # Top level dir, used in subdirs' Makefiles
|
export ASTTOPDIR # Top level dir, used in subdirs' Makefiles
|
||||||
export ASTERISKVERSION
|
export ASTERISKVERSION
|
||||||
@@ -107,7 +101,7 @@ ASTCFLAGS+=$(COPTS)
|
|||||||
ASTLDFLAGS+=$(LDOPTS)
|
ASTLDFLAGS+=$(LDOPTS)
|
||||||
|
|
||||||
# libxml2 cflags
|
# libxml2 cflags
|
||||||
ASTCFLAGS+=$(LIBXML2_INCLUDE)
|
_ASTCFLAGS+=$(LIBXML2_INCLUDE)
|
||||||
|
|
||||||
#Uncomment this to see all build commands instead of 'quiet' output
|
#Uncomment this to see all build commands instead of 'quiet' output
|
||||||
#NOISY_BUILD=yes
|
#NOISY_BUILD=yes
|
||||||
@@ -174,7 +168,7 @@ HTTP_DOCSDIR=/var/www/html
|
|||||||
HTTP_CGIDIR=/var/www/cgi-bin
|
HTTP_CGIDIR=/var/www/cgi-bin
|
||||||
|
|
||||||
# Uncomment this to use the older DSP routines
|
# Uncomment this to use the older DSP routines
|
||||||
#ASTCFLAGS+=-DOLD_DSP_ROUTINES
|
#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
|
||||||
|
|
||||||
# If the file .asterisk.makeopts is present in your home directory, you can
|
# If the file .asterisk.makeopts is present in your home directory, you can
|
||||||
# include all of your favorite menuselect options so that every time you download
|
# include all of your favorite menuselect options so that every time you download
|
||||||
@@ -224,59 +218,59 @@ ifeq ($(OSARCH),linux-gnu)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring -save-temps,$(ASTCFLAGS)),)
|
ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
|
||||||
ifeq ($(findstring -pipe,$(ASTCFLAGS)),)
|
ifeq ($(findstring -pipe,$(_ASTCFLAGS) $(ASTCFLAGS)),)
|
||||||
ASTCFLAGS+=-pipe
|
_ASTCFLAGS+=-pipe
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring -Wall,$(ASTCFLAGS)),)
|
ifeq ($(findstring -Wall,$(_ASTCFLAGS) $(ASTCFLAGS)),)
|
||||||
ASTCFLAGS+=-Wall
|
_ASTCFLAGS+=-Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
|
_ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
|
||||||
|
|
||||||
ifeq ($(AST_DEVMODE),yes)
|
ifeq ($(AST_DEVMODE),yes)
|
||||||
ASTCFLAGS+=-Werror
|
_ASTCFLAGS+=-Werror
|
||||||
ASTCFLAGS+=-Wunused
|
_ASTCFLAGS+=-Wunused
|
||||||
ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
|
_ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
|
||||||
ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
|
_ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
|
||||||
ASTCFLAGS+=-Wundef
|
_ASTCFLAGS+=-Wundef
|
||||||
ASTCFLAGS+=-Wmissing-format-attribute
|
_ASTCFLAGS+=-Wmissing-format-attribute
|
||||||
ASTCFLAGS+=-Wformat=2
|
_ASTCFLAGS+=-Wformat=2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring BSD,$(OSARCH)),)
|
ifneq ($(findstring BSD,$(OSARCH)),)
|
||||||
ASTCFLAGS+=-I/usr/local/include
|
_ASTCFLAGS+=-I/usr/local/include
|
||||||
ASTLDFLAGS+=-L/usr/local/lib
|
_ASTLDFLAGS+=-L/usr/local/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring -march,$(ASTCFLAGS)),)
|
ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
|
||||||
ifneq ($(PROC),ultrasparc)
|
ifneq ($(PROC),ultrasparc)
|
||||||
ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
_ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROC),ppc)
|
ifeq ($(PROC),ppc)
|
||||||
ASTCFLAGS+=-fsigned-char
|
_ASTCFLAGS+=-fsigned-char
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),FreeBSD)
|
ifeq ($(OSARCH),FreeBSD)
|
||||||
# -V is understood by BSD Make, not by GNU make.
|
# -V is understood by BSD Make, not by GNU make.
|
||||||
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
|
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
|
||||||
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
_ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),NetBSD)
|
ifeq ($(OSARCH),NetBSD)
|
||||||
ASTCFLAGS+=-pthread -I/usr/pkg/include
|
_ASTCFLAGS+=-pthread -I/usr/pkg/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),OpenBSD)
|
ifeq ($(OSARCH),OpenBSD)
|
||||||
ASTCFLAGS+=-pthread -ftrampolines
|
_ASTCFLAGS+=-pthread -ftrampolines
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),SunOS)
|
ifeq ($(OSARCH),SunOS)
|
||||||
ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2
|
_ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
|
ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
|
||||||
@@ -289,9 +283,7 @@ ifneq ($(wildcard .svn),)
|
|||||||
ASTERISKVERSIONNUM:=999999
|
ASTERISKVERSIONNUM:=999999
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# XXX MALLOC_DEBUG is probably unused, Makefile.moddir_rules adds the
|
_ASTCFLAGS+=$(OPTIONS)
|
||||||
# value directly to ASTCFLAGS
|
|
||||||
ASTCFLAGS+=$(MALLOC_DEBUG)$(OPTIONS)
|
|
||||||
|
|
||||||
MOD_SUBDIRS:=channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
|
MOD_SUBDIRS:=channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
|
||||||
OTHER_SUBDIRS:=utils agi
|
OTHER_SUBDIRS:=utils agi
|
||||||
@@ -306,7 +298,7 @@ MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
|
|||||||
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
|
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
|
||||||
|
|
||||||
ifneq ($(findstring darwin,$(OSARCH)),)
|
ifneq ($(findstring darwin,$(OSARCH)),)
|
||||||
ASTCFLAGS+=-D__Darwin__
|
_ASTCFLAGS+=-D__Darwin__
|
||||||
SOLINK=-bundle -undefined suppress -force_flat_namespace
|
SOLINK=-bundle -undefined suppress -force_flat_namespace
|
||||||
else
|
else
|
||||||
# These are used for all but Darwin
|
# These are used for all but Darwin
|
||||||
@@ -415,10 +407,10 @@ res: main
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(MOD_SUBDIRS):
|
$(MOD_SUBDIRS):
|
||||||
+@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
|
@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
|
||||||
|
|
||||||
$(OTHER_SUBDIRS):
|
$(OTHER_SUBDIRS):
|
||||||
+@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
|
@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
|
||||||
|
|
||||||
defaults.h: makeopts
|
defaults.h: makeopts
|
||||||
@build_tools/make_defaults_h > $@.tmp
|
@build_tools/make_defaults_h > $@.tmp
|
||||||
@@ -476,7 +468,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
|
|||||||
rm -f build_tools/menuselect-deps
|
rm -f build_tools/menuselect-deps
|
||||||
|
|
||||||
datafiles: _all
|
datafiles: _all
|
||||||
if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
|
if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
|
||||||
# Should static HTTP be installed during make samples or even with its own target ala
|
# Should static HTTP be installed during make samples or even with its own target ala
|
||||||
# webvoicemail? There are portions here that *could* be customized but might also be
|
# webvoicemail? There are portions here that *could* be customized but might also be
|
||||||
# improved a lot. I'll put it here for now.
|
# improved a lot. I'll put it here for now.
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
# repeat the left hand side to set multiple variables.
|
# repeat the left hand side to set multiple variables.
|
||||||
|
|
||||||
ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
|
ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
|
||||||
ASTCFLAGS+=${GC_CFLAGS}
|
_ASTCFLAGS+=${GC_CFLAGS}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
|
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
|
||||||
@@ -57,18 +57,18 @@ endif
|
|||||||
# (they are stored in file 'makeopts')
|
# (they are stored in file 'makeopts')
|
||||||
|
|
||||||
$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
|
$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
|
||||||
ASTCFLAGS+= -DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
|
_ASTCFLAGS+= -DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
|
||||||
|
|
||||||
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
||||||
# don't define -fPIC on mingw32 and cygwin, it is the default
|
# don't define -fPIC on mingw32 and cygwin, it is the default
|
||||||
$(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
|
$(LOADABLE_MODS:%=%.so): _ASTCFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For loadable modules, pass _LIB and _LDFLAGS from menuselect.
|
# For loadable modules, pass _LIB and _LDFLAGS from menuselect.
|
||||||
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
|
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
|
||||||
$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
|
$(LOADABLE_MODS:%=%.so): _ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
|
||||||
|
|
||||||
$(EMBEDDED_MODS:%=%.o): ASTCFLAGS+=-DEMBEDDED_MODULE=$*
|
$(EMBEDDED_MODS:%=%.o): _ASTCFLAGS+=-DEMBEDDED_MODULE=$*
|
||||||
|
|
||||||
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
|
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
|
||||||
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
|
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
|
||||||
|
@@ -38,26 +38,20 @@ endif
|
|||||||
OPTIMIZE?=-O6
|
OPTIMIZE?=-O6
|
||||||
|
|
||||||
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
|
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
|
||||||
# More GSM codec optimization
|
_ASTCFLAGS+=$(OPTIMIZE)
|
||||||
# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
|
|
||||||
# which support MMX instructions. This should be newer pentiums,
|
|
||||||
# ppro's, etc, as well as the AMD K6 and K7.
|
|
||||||
#K6OPT=-DK6OPT
|
|
||||||
|
|
||||||
ASTCFLAGS+=$(OPTIMIZE)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# shortcuts for common combinations of flags; these must be recursively expanded so that
|
# shortcuts for common combinations of flags; these must be recursively expanded so that
|
||||||
# per-target settings will be applied
|
# per-target settings will be applied
|
||||||
CC_CFLAGS=$(PTHREAD_CFLAGS) $(ASTCFLAGS)
|
CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
|
||||||
CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS))
|
CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
|
||||||
|
|
||||||
ifeq ($(GNU_LD),1)
|
ifeq ($(GNU_LD),1)
|
||||||
SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports)
|
SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
|
CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
|
||||||
CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
|
CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
|
||||||
CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
|
CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
|
||||||
CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
|
CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
|
||||||
|
|
||||||
@@ -73,43 +67,43 @@ endif
|
|||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(ECHO_PREFIX) echo " [AS] $< -> $@"
|
$(ECHO_PREFIX) echo " [AS] $< -> $@"
|
||||||
ifeq ($(COMPILE_DOUBLE),yes)
|
ifeq ($(COMPILE_DOUBLE),yes)
|
||||||
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
|
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
|
||||||
endif
|
endif
|
||||||
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
|
||||||
|
|
||||||
%.o: %.i
|
%.o: %.i
|
||||||
$(ECHO_PREFIX) echo " [CCi] $< -> $@"
|
$(ECHO_PREFIX) echo " [CCi] $< -> $@"
|
||||||
ifeq ($(COMPILE_DOUBLE),yes)
|
ifeq ($(COMPILE_DOUBLE),yes)
|
||||||
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
|
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
|
||||||
endif
|
endif
|
||||||
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
|
||||||
|
|
||||||
ifneq ($(COMPILE_DOUBLE),yes)
|
ifneq ($(COMPILE_DOUBLE),yes)
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(ECHO_PREFIX) echo " [CC] $< -> $@"
|
$(ECHO_PREFIX) echo " [CC] $< -> $@"
|
||||||
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.i: %.c
|
%.i: %.c
|
||||||
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
|
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
|
||||||
$(CMD_PREFIX) $(CC) -o $@ -E $< $(CC_CFLAGS) $(MAKE_DEPS)
|
$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS)
|
||||||
|
|
||||||
%.oo: %.ii
|
%.oo: %.ii
|
||||||
$(ECHO_PREFIX) echo " [CXXi] $< -> $@"
|
$(ECHO_PREFIX) echo " [CXXi] $< -> $@"
|
||||||
ifeq ($(COMPILE_DOUBLE),yes)
|
ifeq ($(COMPILE_DOUBLE),yes)
|
||||||
$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
|
$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(OPTIMIZE) $(CXX_CFLAGS)
|
||||||
endif
|
endif
|
||||||
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
|
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
|
||||||
|
|
||||||
ifneq ($(COMPILE_DOUBLE),yes)
|
ifneq ($(COMPILE_DOUBLE),yes)
|
||||||
%.oo: %.cc
|
%.oo: %.cc
|
||||||
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
|
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
|
||||||
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
|
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.ii: %.cc
|
%.ii: %.cc
|
||||||
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
|
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
|
||||||
$(CMD_PREFIX) $(CXX) -o $@ -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
|
$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
|
||||||
|
|
||||||
%.so: %.o
|
%.so: %.o
|
||||||
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
||||||
@@ -133,6 +127,6 @@ endif
|
|||||||
|
|
||||||
%: %.o
|
%: %.o
|
||||||
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
||||||
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(CXX_LIBS)
|
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
|
||||||
|
|
||||||
dist-clean:: clean
|
dist-clean:: clean
|
||||||
|
@@ -44,7 +44,7 @@ clean::
|
|||||||
|
|
||||||
$(if $(filter format_mp3,$(EMBEDDED_MODS)),modules.link,format_mp3.so): mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
|
$(if $(filter format_mp3,$(EMBEDDED_MODS)),modules.link,format_mp3.so): mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
|
||||||
|
|
||||||
chan_ooh323.o: ASTCFLAGS+=$(H323CFLAGS)
|
chan_ooh323.o: _ASTCFLAGS+=$(H323CFLAGS)
|
||||||
|
|
||||||
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): ASTCFLAGS+=$(H323CFLAGS)
|
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): _ASTCFLAGS+=$(H323CFLAGS)
|
||||||
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o
|
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o
|
||||||
|
@@ -25,20 +25,15 @@ endif
|
|||||||
|
|
||||||
include $(ASTTOPDIR)/Makefile.rules
|
include $(ASTTOPDIR)/Makefile.rules
|
||||||
|
|
||||||
ASTCFLAGS+=-DSTANDALONE
|
_ASTCFLAGS+=-DSTANDALONE
|
||||||
|
|
||||||
all: $(AGIS)
|
all: $(AGIS)
|
||||||
|
|
||||||
strcompat.c: ../main/strcompat.c
|
strcompat.c: ../main/strcompat.c
|
||||||
@cp $< $@
|
@cp $< $@
|
||||||
strcompat.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
eagi-test.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
eagi-test: eagi-test.o strcompat.o
|
eagi-test: eagi-test.o strcompat.o
|
||||||
|
|
||||||
eagi-sphinx-test.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
eagi-sphinx-test: eagi-sphinx-test.o
|
eagi-sphinx-test: eagi-sphinx-test.o
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
@@ -85,11 +85,11 @@ chan_h323.so: chan_h323.o h323/libchanh323.a
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
chan_misdn.o: ASTCFLAGS+=-Imisdn
|
chan_misdn.o: _ASTCFLAGS+=-Imisdn
|
||||||
|
|
||||||
misdn_config.o: ASTCFLAGS+=-Imisdn
|
misdn_config.o: _ASTCFLAGS+=-Imisdn
|
||||||
|
|
||||||
misdn/isdn_lib.o: ASTCFLAGS+=-Wno-strict-aliasing
|
misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
|
||||||
|
|
||||||
$(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
|
$(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ $(if $(filter chan_oss,$(EMBEDDED_MODS)),modules.link,chan_oss.so): console_vide
|
|||||||
chan_usbradio.o: ./xpmr/xpmr.c ./xpmr/xpmr.h ./xpmr/xpmr_coef.h
|
chan_usbradio.o: ./xpmr/xpmr.c ./xpmr/xpmr.h ./xpmr/xpmr_coef.h
|
||||||
|
|
||||||
chan_usbradio.so: LIBS+=-lusb -lasound
|
chan_usbradio.so: LIBS+=-lusb -lasound
|
||||||
chan_usbradio.so: ASTCFLAGS+=-DNDEBUG
|
chan_usbradio.so: _ASTCFLAGS+=-DNDEBUG
|
||||||
|
|
||||||
h323/Makefile.ast:
|
h323/Makefile.ast:
|
||||||
$(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
|
$(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
|
||||||
|
@@ -45,7 +45,7 @@ $(LIBLPC10):
|
|||||||
$(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
|
$(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
|
||||||
|
|
||||||
$(LIBILBC):
|
$(LIBILBC):
|
||||||
@$(MAKE) -C ilbc all ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
|
@$(MAKE) -C ilbc all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
|
||||||
|
|
||||||
$(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
|
$(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
|
||||||
|
|
||||||
|
@@ -154,7 +154,7 @@ INC = $(ROOT)/inc
|
|||||||
DEBUG = -DNDEBUG
|
DEBUG = -DNDEBUG
|
||||||
######### Remove -DNDEBUG to enable assertions.
|
######### Remove -DNDEBUG to enable assertions.
|
||||||
|
|
||||||
ASTCFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
|
_ASTCFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
|
||||||
$(LTP_CUT) $(WAV49) $(K6OPT) $(CCINC) -I$(INC)
|
$(LTP_CUT) $(WAV49) $(K6OPT) $(CCINC) -I$(INC)
|
||||||
######### It's $(CC) $(CFLAGS)
|
######### It's $(CC) $(CFLAGS)
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ CFLAGS+= -fPIC -Wno-comment
|
|||||||
|
|
||||||
# The code here generates lots of warnings, so compiling with -Werror
|
# The code here generates lots of warnings, so compiling with -Werror
|
||||||
# fails miserably. Remove it for the time being.
|
# fails miserably. Remove it for the time being.
|
||||||
ASTCFLAGS:= $(ASTCFLAGS:-Werror=)
|
_ASTCFLAGS:=$(_ASTCFLAGS:-Werror=)
|
||||||
|
|
||||||
#fix for PPC processors and ALPHA, And UltraSparc too
|
#fix for PPC processors and ALPHA, And UltraSparc too
|
||||||
ifneq ($(OSARCH),Darwin)
|
ifneq ($(OSARCH),Darwin)
|
||||||
|
@@ -8,7 +8,7 @@ working you need to perform the following steps:
|
|||||||
|
|
||||||
The simplest way to do it is add this one line to channels/Makefile:
|
The simplest way to do it is add this one line to channels/Makefile:
|
||||||
|
|
||||||
chan_oss.so: ASTCFLAGS += -DHAVE_VIDEO_CONSOLE
|
chan_oss.so: _ASTCFLAGS+=-DHAVE_VIDEO_CONSOLE
|
||||||
|
|
||||||
+++ Install prerequisite packages +++
|
+++ Install prerequisite packages +++
|
||||||
|
|
||||||
|
@@ -24,4 +24,4 @@ include $(ASTTOPDIR)/Makefile.moddir_rules
|
|||||||
# can't check the string and arguments to ensure they match, so this
|
# can't check the string and arguments to ensure they match, so this
|
||||||
# warning must be disabled; for safety reasons, SPRINTF() is kept in
|
# warning must be disabled; for safety reasons, SPRINTF() is kept in
|
||||||
# a separate module so that as little code as possible is left unchecked
|
# a separate module so that as little code as possible is left unchecked
|
||||||
func_sprintf.o: ASTCFLAGS+=-Wno-format-nonliteral
|
func_sprintf.o: _ASTCFLAGS+=-Wno-format-nonliteral
|
||||||
|
@@ -94,11 +94,11 @@ endif
|
|||||||
CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/
|
CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/
|
||||||
|
|
||||||
editline/libedit.a: CHECK_SUBDIR
|
editline/libedit.a: CHECK_SUBDIR
|
||||||
cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
|
cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=) $(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
|
||||||
$(MAKE) -C editline libedit.a
|
$(MAKE) -C editline libedit.a
|
||||||
|
|
||||||
db1-ast/libdb1.a: CHECK_SUBDIR
|
db1-ast/libdb1.a: CHECK_SUBDIR
|
||||||
CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
|
CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS) $(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
|
||||||
|
|
||||||
ast_expr2.c ast_expr2.h:
|
ast_expr2.c ast_expr2.h:
|
||||||
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
|
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
|
||||||
@@ -111,7 +111,7 @@ ast_expr2f.c:
|
|||||||
cat $@.fix >> $@
|
cat $@.fix >> $@
|
||||||
rm $@.fix
|
rm $@.fix
|
||||||
|
|
||||||
ast_expr2f.o: ASTCFLAGS+=-Wno-unused
|
ast_expr2f.o: _ASTCFLAGS+=-Wno-unused
|
||||||
|
|
||||||
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
|
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
|
||||||
$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
|
$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
|
||||||
@@ -120,10 +120,10 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
|
|||||||
rm ast_expr2.o ast_expr2f.o
|
rm ast_expr2.o ast_expr2f.o
|
||||||
|
|
||||||
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
|
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
|
||||||
http.o: ASTCFLAGS+=$(GMIME_INCLUDE)
|
http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral
|
stdtime/localtime.o: _ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral
|
||||||
|
|
||||||
AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
|
AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
|
||||||
AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
|
AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
|
||||||
@@ -152,7 +152,7 @@ GMIMELDFLAGS+=$(GMIME_LIB)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) asterisk.exports
|
$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) asterisk.exports
|
||||||
@$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
|
@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
|
||||||
$(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
|
$(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
|
||||||
ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
|
ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
|
||||||
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS)
|
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS)
|
||||||
|
@@ -48,11 +48,11 @@ clean-depend:
|
|||||||
clean:
|
clean:
|
||||||
rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS) */*.s */*.i
|
rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS) */*.s */*.i
|
||||||
|
|
||||||
ASTCFLAGS:=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno $(ASTCFLAGS)
|
_ASTCFLAGS:=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno $(_ASTCFLAGS)
|
||||||
|
|
||||||
OSTYPE=$(shell uname -s)
|
OSTYPE=$(shell uname -s)
|
||||||
ifeq ($(OSTYPE),SunOS)
|
ifeq ($(OSTYPE),SunOS)
|
||||||
ASTCFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
|
_ASTCFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
db_dump185.o: db_dump185.c
|
db_dump185.o: db_dump185.c
|
||||||
|
@@ -27,8 +27,8 @@ clean::
|
|||||||
rm -f ael/*.o ael/*.i
|
rm -f ael/*.o ael/*.i
|
||||||
|
|
||||||
dundi-parser.o: dundi-parser.h
|
dundi-parser.o: dundi-parser.h
|
||||||
dundi-parser.o: ASTCFLAGS+=-I.
|
dundi-parser.o: _ASTCFLAGS+=-I.
|
||||||
|
|
||||||
pbx_gtkconsole.o: ASTCFLAGS+=-Wno-strict-prototypes
|
pbx_gtkconsole.o: _ASTCFLAGS+=-Wno-strict-prototypes
|
||||||
|
|
||||||
$(if $(filter pbx_dundi,$(EMBEDDED_MODS)),modules.link,pbx_dundi.so): dundi-parser.o
|
$(if $(filter pbx_dundi,$(EMBEDDED_MODS)),modules.link,pbx_dundi.so): dundi-parser.o
|
||||||
|
@@ -29,15 +29,15 @@ ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
|||||||
res_agi.so_LIBS:= -lres_speech.so
|
res_agi.so_LIBS:= -lres_speech.so
|
||||||
endif
|
endif
|
||||||
|
|
||||||
res_config_ldap.o: ASTCFLAGS+=-DLDAP_DEPRECATED
|
res_config_ldap.o: _ASTCFLAGS+=-DLDAP_DEPRECATED
|
||||||
|
|
||||||
ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
|
ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
|
||||||
ael/ael_lex.o: ASTCFLAGS+=-I. -Iael -Wno-unused
|
ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused
|
||||||
|
|
||||||
ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
|
ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
|
||||||
ael/ael.tab.o: ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
|
ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
|
||||||
|
|
||||||
ais/clm.o ais/evt.o: ASTCFLAGS+=${AIS_INCLUDE}
|
ais/clm.o ais/evt.o: _ASTCFLAGS+=${AIS_INCLUDE}
|
||||||
|
|
||||||
$(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
|
$(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ UTILS:=$(ALL_UTILS)
|
|||||||
|
|
||||||
LIBS += $(BKTR_LIB) # astobj2 with devmode uses backtrace
|
LIBS += $(BKTR_LIB) # astobj2 with devmode uses backtrace
|
||||||
|
|
||||||
|
_ASTCFLAGS+=-DSTANDALONE
|
||||||
|
|
||||||
include $(ASTTOPDIR)/Makefile.rules
|
include $(ASTTOPDIR)/Makefile.rules
|
||||||
|
|
||||||
ifeq ($(OSARCH),SunOS)
|
ifeq ($(OSARCH),SunOS)
|
||||||
@@ -91,11 +93,10 @@ clean:
|
|||||||
md5.c: $(ASTTOPDIR)/main/md5.c
|
md5.c: $(ASTTOPDIR)/main/md5.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
md5.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
astman: astman.o md5.o
|
astman: astman.o md5.o
|
||||||
astman: LIBS+=$(NEWT_LIB)
|
astman: LIBS+=$(NEWT_LIB)
|
||||||
astman.o: ASTCFLAGS+=-DNO_MALLOC_DEBUG -DSTANDALONE
|
astman.o: _ASTCFLAGS+=-DNO_MALLOC_DEBUG
|
||||||
|
|
||||||
stereorize: stereorize.o frame.o
|
stereorize: stereorize.o frame.o
|
||||||
stereorize: LIBS+=-lm
|
stereorize: LIBS+=-lm
|
||||||
@@ -104,22 +105,17 @@ hashtab.c: $(ASTTOPDIR)/main/hashtab.c
|
|||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
|
|
||||||
hashtab.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
strcompat.c: $(ASTTOPDIR)/main/strcompat.c
|
strcompat.c: $(ASTTOPDIR)/main/strcompat.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
strcompat.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
pval.c: $(ASTTOPDIR)/res/ael/pval.c
|
pval.c: $(ASTTOPDIR)/res/ael/pval.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
pval.o : ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
|
ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
ast_expr2.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
ast_expr2.h: $(ASTTOPDIR)/main/ast_expr2.h
|
ast_expr2.h: $(ASTTOPDIR)/main/ast_expr2.h
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
@@ -128,74 +124,61 @@ ast_expr2.h: $(ASTTOPDIR)/main/ast_expr2.h
|
|||||||
ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
|
ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE -I$(ASTTOPDIR)/main -Wno-unused
|
ast_expr2f.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/main -Wno-unused
|
||||||
|
|
||||||
check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
|
check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
|
||||||
check_expr.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
|
aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael -DYYENABLE_NLS=0 -DSTANDALONE
|
aelbison.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael -DYYENABLE_NLS=0
|
||||||
|
|
||||||
pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
|
pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
pbx_ael.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
|
aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
|
|
||||||
ael_main.o: ASTCFLAGS+=-DSTANDALONE
|
aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused
|
||||||
|
|
||||||
aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE -Wno-unused
|
|
||||||
aelparse: LIBS+=-lm
|
aelparse: LIBS+=-lm
|
||||||
aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
|
aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
|
||||||
|
|
||||||
astobj2.c: $(ASTTOPDIR)/main/astobj2.c
|
astobj2.c: $(ASTTOPDIR)/main/astobj2.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
astobj2.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
utils.c: $(ASTTOPDIR)/main/utils.c
|
utils.c: $(ASTTOPDIR)/main/utils.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
utils.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
poll.c: $(ASTTOPDIR)/main/poll.c
|
poll.c: $(ASTTOPDIR)/main/poll.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
poll.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
strings.c: $(ASTTOPDIR)/main/strings.c
|
strings.c: $(ASTTOPDIR)/main/strings.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
strings.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
sha1.c: $(ASTTOPDIR)/main/sha1.c
|
sha1.c: $(ASTTOPDIR)/main/sha1.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
sha1.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
|
threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
|
||||||
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
|
||||||
$(CMD_PREFIX) cp "$<" "$@"
|
$(CMD_PREFIX) cp "$<" "$@"
|
||||||
threadstorage.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
hashtest2.o: ASTCFLAGS+=-O0 -DSTANDALONE
|
hashtest2.o: _ASTCFLAGS+=-O0
|
||||||
hashtest2: hashtest2.o md5.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
hashtest2: hashtest2.o md5.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
||||||
|
|
||||||
hashtest: hashtest.o md5.o hashtab.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
hashtest: hashtest.o md5.o hashtab.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
||||||
hashtest.o: ASTCFLAGS+=-O0 -DSTANDALONE
|
hashtest.o: _ASTCFLAGS+=-O0
|
||||||
|
|
||||||
refcounter: refcounter.o md5.o hashtab.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
refcounter: refcounter.o md5.o hashtab.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
|
||||||
refcounter.o: ASTCFLAGS+=-O0 -DSTANDALONE
|
refcounter.o: _ASTCFLAGS+=-O0
|
||||||
|
|
||||||
extconf.o: extconf.c
|
extconf.o: extconf.c
|
||||||
extconf.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
conf2ael.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
|
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
|
||||||
|
|
||||||
@@ -210,8 +193,6 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTT
|
|||||||
rm ast_expr2z.o ast_expr2fz.o
|
rm ast_expr2z.o ast_expr2fz.o
|
||||||
./check_expr2 expr2.testinput
|
./check_expr2 expr2.testinput
|
||||||
|
|
||||||
smsq.o: ASTCFLAGS+=-DSTANDALONE
|
|
||||||
|
|
||||||
smsq: smsq.o strcompat.o
|
smsq: smsq.o strcompat.o
|
||||||
smsq: LIBS+=$(POPT_LIB)
|
smsq: LIBS+=$(POPT_LIB)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user