2 # Asterisk -- An open source telephony toolkit.
6 # Copyright (C) 1999-2010, Digium, Inc.
8 # Mark Spencer <markster@digium.com>
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
14 # All Makefiles use the following variables:
16 # ASTCFLAGS - compiler options provided by the user (if any)
17 # _ASTCFLAGS - compiler options provided by the build system
18 # ASTLDFLAGS - linker flags (not libraries) provided by the user (if any)
19 # _ASTLDFLAGS - linker flags (not libraries) provided by the build system
20 # LIBS - additional libraries, at top-level for all links,
21 # on a single object just for that object
22 # SOLINK - linker flags used only for creating dynamically loadable modules
24 # DYLINK - linker flags used only for creating shared libaries
25 # (.so files on Unix-type platforms, .dylib on Darwin)
27 # Values for ASTCFLAGS and ASTLDFLAGS can be specified in the
28 # environment when running make, as follows:
30 # $ ASTCFLAGS="-Werror" make ...
32 # or as a variable value on the make command line itself:
34 # $ make ASTCFLAGS="-Werror" ...
36 export ASTTOPDIR # Top level dir, used in subdirs' Makefiles
37 export ASTERISKVERSION
38 export ASTERISKVERSIONNUM
40 #--- values used for default paths
42 # DESTDIR is the staging (or final) directory where files are copied
43 # during the install process. Define it before 'export', otherwise
44 # export will set it to the empty string making ?= fail.
45 # Trying to run asterisk from the DESTDIR is completely unsupported
47 # WARNING: do not put spaces or comments after the value.
48 DESTDIR?=$(INSTALL_PATH)
51 export INSTALL_PATH # Additional prefix for the following paths
52 export ASTETCDIR # Path for config files
68 export OSARCH # Operating system
70 export NOISY_BUILD # Used in Makefile.rules
71 export MENUSELECT_CFLAGS # Options selected in menuselect.
72 export AST_DEVMODE # Set to "yes" for additional compiler
74 export AST_DEVMODE_STRICT # Enables shadow warnings (-Wshadow)
76 export _SOLINK # linker flags for all shared objects
77 export SOLINK # linker flags for loadable modules
78 export DYLINK # linker flags for shared libraries
79 export STATIC_BUILD # Additional cflags, set to -static
80 # for static builds. Probably
81 # should go directly to ASTLDFLAGS
83 #--- paths to various commands
84 # The makeopts include below tries to set these if they're found during
98 export WGET_EXTRA_ARGS
100 export LDCONFIG_FLAGS
105 # start the primary CFLAGS and LDFLAGS with any that were provided
106 # to the configure script
107 _ASTCFLAGS:=$(CONFIG_CFLAGS)
108 _ASTLDFLAGS:=$(CONFIG_LDFLAGS)
110 # Some build systems, such as the one in openwrt, like to pass custom target
111 # CFLAGS and LDFLAGS in the COPTS and LDOPTS variables; these should also
112 # go before any build-system computed flags, since they are defaults, not
115 _ASTLDFLAGS+=$(LDOPTS)
118 _ASTCFLAGS+=$(LIBXML2_INCLUDE)
120 #Uncomment this to see all build commands instead of 'quiet' output
124 space:=$(empty) $(empty)
125 ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR))
127 # Overwite config files on "make samples"
130 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
133 # Asterisk.conf is located in ASTETCDIR or by using the -C flag
134 # when starting Asterisk
135 ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
136 AGI_DIR=$(ASTDATADIR)/agi-bin
138 # If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
139 HTTP_DOCSDIR=/var/www/html
140 # Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
141 HTTP_CGIDIR=/var/www/cgi-bin
143 # If your platform's linker expects a prefix on symbols generated from compiling C
144 # source files, set LINKER_SYMBOL_PREFIX to that value. On some systems, exported symbols
145 # from C source files are prefixed with '_', for example. If this value is not set
146 # properly, the linker scripts that live in the '*.exports' files in various places
147 # in this tree will unintentionally suppress symbols that should be visible
148 # in the final binary objects.
149 LINKER_SYMBOL_PREFIX=
151 # Uncomment this to use the older DSP routines
152 #_ASTCFLAGS+=-DOLD_DSP_ROUTINES
154 # If the file .asterisk.makeopts is present in your home directory, you can
155 # include all of your favorite menuselect options so that every time you download
156 # a new version of Asterisk, you don't have to run menuselect to set them.
157 # The file /etc/asterisk.makeopts will also be included but can be overridden
158 # by the file in your home directory.
160 GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
161 USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
163 MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
164 OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
166 # Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS
169 ifeq ($(OSARCH),linux-gnu)
170 # flag to tell 'ldconfig' to only process specified directories
174 ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
175 ifeq ($(findstring -pipe,$(_ASTCFLAGS) $(ASTCFLAGS)),)
180 ifeq ($(findstring -Wall,$(_ASTCFLAGS) $(ASTCFLAGS)),)
184 _ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_NESTED_FUNCTIONS) $(DEBUG)
187 ifeq ($(AST_DEVMODE),yes)
190 _ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
191 _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
192 _ASTCFLAGS+=$(AST_TRAMPOLINES)
194 _ASTCFLAGS+=-Wmissing-format-attribute
195 _ASTCFLAGS+=-Wformat=2
196 ifeq ($(AST_DEVMODE_STRICT),yes)
199 ADDL_TARGETS+=validate-docs
202 ifneq ($(findstring BSD,$(OSARCH)),)
203 _ASTCFLAGS+=-isystem /usr/local/include
206 ifeq ($(OSARCH),FreeBSD)
207 # -V is understood by BSD Make, not by GNU make.
208 BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
209 _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
210 # flag to tell 'ldconfig' to only process specified directories
214 ifeq ($(OSARCH),NetBSD)
215 _ASTCFLAGS+=-pthread -I/usr/pkg/include
218 ifeq ($(OSARCH),OpenBSD)
219 _ASTCFLAGS+=-pthread -ftrampolines
222 ifeq ($(OSARCH),SunOS)
223 _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
227 ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) GIT=$(GIT) build_tools/make_version .)
230 ifneq ($(wildcard .version),)
231 ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
235 ifneq ($(wildcard .svn),)
236 ASTERISKVERSIONNUM:=999999
239 _ASTCFLAGS+=$(OPTIONS)
241 MOD_SUBDIRS:=channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
242 OTHER_SUBDIRS:=utils agi
243 SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
244 SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
245 SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
246 SUBDIRS_DIST_CLEAN:=$(SUBDIRS:%=%-dist-clean)
247 SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
248 MOD_SUBDIRS_EMBED_LDSCRIPT:=$(MOD_SUBDIRS:%=%-embed-ldscript)
249 MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
250 MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
251 MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
253 ifneq ($(findstring darwin,$(OSARCH)),)
254 _ASTCFLAGS+=-D__Darwin__ -mmacosx-version-min=10.6
255 _SOLINK=-mmacosx-version-min=10.6 -Xlinker -undefined -Xlinker dynamic_lookup
256 _SOLINK+=/usr/lib/bundle1.o
257 SOLINK=-bundle $(_SOLINK)
258 DYLINK=-Xlinker -dylib $(_SOLINK)
259 _ASTLDFLAGS+=-L/usr/local/lib
261 # These are used for all but Darwin
264 ifneq ($(findstring BSD,$(OSARCH)),)
265 _ASTLDFLAGS+=-L/usr/local/lib
269 # Include rpath settings
270 _ASTLDFLAGS+=$(AST_RPATH)
272 ifeq ($(OSARCH),SunOS)
273 SOLINK=-shared -fpic -L/usr/local/ssl/lib -lrt
277 ifeq ($(OSARCH),OpenBSD)
282 # comment to print directories during submakes
285 ifneq ($(INSIDE_EMACS),)
289 SILENTMAKE:=$(MAKE) --quiet --no-print-directory
290 ifneq ($(PRINT_DIR)$(NOISY_BUILD),)
293 SUBMAKE:=$(MAKE) --quiet --no-print-directory
296 # $(MAKE) is printed in several places, and we want it to be a
297 # fixed size string. Define a variable whose name has also the
298 # same size, so we can easily align text.
299 ifeq ($(MAKE), gmake)
306 @echo " +--------- Asterisk Build Complete ---------+"
307 @echo " + Asterisk has successfully been built, and +"
308 @echo " + can be installed by running: +"
310 @echo " + $(mK) install +"
311 @echo " +-------------------------------------------+"
314 @echo " +--------- Asterisk Build Complete ---------+"
315 @echo " + Asterisk has successfully been built, and +"
316 @echo " + can be installed by running: +"
318 @echo " + $(mK) install +"
319 @echo " +-------------------------------------------+"
322 _all: makeopts $(SUBDIRS) doc/core-en_US.xml $(ADDL_TARGETS)
324 _full: makeopts $(SUBDIRS) doc/full-en_US.xml $(ADDL_TARGETS)
328 @echo "**** The configure script must be executed before running '$(MAKE)'."
329 @echo "**** Please run \"./configure\"."
333 menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
334 ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
335 menuselect/menuselect --check-deps $@
336 menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
339 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
340 +@echo "EMBED_LDSCRIPTS+="`$(SILENTMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
342 $(MOD_SUBDIRS_EMBED_LDFLAGS):
343 +@echo "EMBED_LDFLAGS+="`$(SILENTMAKE) -C $(@:-embed-ldflags=) SUBDIR=$(@:-embed-ldflags=) __embed_ldflags` >> makeopts.embed_rules
345 $(MOD_SUBDIRS_EMBED_LIBS):
346 +@echo "EMBED_LIBS+="`$(SILENTMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules
348 $(MOD_SUBDIRS_MENUSELECT_TREE):
349 +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
350 +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
352 makeopts.embed_rules: menuselect.makeopts
353 @echo "Generating embedded module rules ..."
355 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT)
356 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS)
357 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS)
359 $(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
361 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
363 # ensure that all module subdirectories are processed before 'main' during
364 # a parallel build, since if there are modules selected to be embedded the
365 # directories containing them must be completed before the main Asterisk
366 # binary can be built
367 main: $(filter-out main,$(MOD_SUBDIRS))
369 # Windows: we need to build main (i.e. the asterisk dll) first,
370 # followed by res, followed by the other directories, because
371 # dll symbols must be resolved during linking and not at runtime.
372 D1:= $(filter-out main,$(MOD_SUBDIRS))
373 D1:= $(filter-out res,$(D1))
379 $(MOD_SUBDIRS): makeopts
380 +@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
382 $(OTHER_SUBDIRS): makeopts
383 +@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
385 defaults.h: makeopts .lastclean build_tools/make_defaults_h
386 @build_tools/make_defaults_h > $@.tmp
387 @cmp -s $@.tmp $@ || mv $@.tmp $@
390 main/version.c: FORCE .lastclean
391 @build_tools/make_version_c > $@.tmp
392 @cmp -s $@.tmp $@ || mv $@.tmp $@
395 include/asterisk/buildopts.h: menuselect.makeopts .lastclean
396 @build_tools/make_buildopts_h > $@.tmp
397 @cmp -s $@.tmp $@ || mv $@.tmp $@
400 # build.h must depend on .lastclean, or parallel make may wipe it out after it's
402 include/asterisk/build.h: .lastclean
403 @build_tools/make_build_h > $@
406 +@$(SUBMAKE) -C $(@:-clean=) clean
408 $(SUBDIRS_DIST_CLEAN):
409 +@$(SUBMAKE) -C $(@:-dist-clean=) dist-clean
411 clean: $(SUBDIRS_CLEAN) _clean
415 rm -f include/asterisk/build.h
417 rm -f doc/core-en_US.xml
418 rm -f doc/full-en_US.xml
419 rm -f docs/rest-api/*.wiki
420 @$(MAKE) -C menuselect clean
421 cp -f .cleancount .lastclean
423 dist-clean: distclean
425 distclean: $(SUBDIRS_DIST_CLEAN) _clean
426 @$(MAKE) -C menuselect dist-clean
427 @$(MAKE) -C sounds dist-clean
428 rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
429 rm -f makeopts.embed_rules
430 rm -f config.log config.status config.cache
431 rm -rf autom4te.cache
432 rm -f include/asterisk/autoconfig.h
433 rm -f include/asterisk/buildopts.h
435 rm -f build_tools/menuselect-deps
437 datafiles: _all doc/core-en_US.xml
438 CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
439 # Should static HTTP be installed during make samples or even with its own target ala
440 # webvoicemail? There are portions here that *could* be customized but might also be
441 # improved a lot. I'll put it here for now.
443 for x in static-http/*; do \
444 $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/static-http" ; \
446 $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
447 $(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/static-http";
448 if [ -d doc/tex/asterisk ] ; then \
449 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
450 for n in doc/tex/asterisk/* ; do \
451 $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
454 for x in images/*.jpg; do \
455 $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
457 $(MAKE) -C sounds install
458 find rest-api -name "*.json" | while read x; do \
459 $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/rest-api" ; \
463 XML_core_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
466 doc/core-en_US.xml: makeopts .lastclean $(XML_core_en_US)
467 @printf "Building Documentation For: "
468 @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
469 @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
470 @echo "<?xml-stylesheet type=\"text/xsl\" href=\"snapshots.xslt\"?>" > $@
471 @echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
472 @for x in $(MOD_SUBDIRS); do \
474 for i in `find $$x -name '*.c'`; do \
475 $(AWK) -f build_tools/get_documentation $$i >> $@ ; \
479 @echo "</docs>" >> $@
482 XML_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
485 doc/full-en_US.xml: makeopts .lastclean $(XML_full_en_US)
487 @echo "--------------------------------------------------------------------------"
488 @echo "--- Please install python to build full documentation ---"
489 @echo "--------------------------------------------------------------------------"
491 @printf "Building Documentation For: "
492 @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
493 @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
494 @echo "<?xml-stylesheet type=\"text/xsl\" href=\"snapshots.xslt\"?>" > $@
495 @echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
496 @for x in $(MOD_SUBDIRS); do \
498 for i in `find $$x -name '*.c'`; do \
499 $(PYTHON) build_tools/get_documentation.py < $$i >> $@ ; \
503 @echo "</docs>" >> $@
504 @$(PYTHON) build_tools/post_process_documentation.py -i $@ -o "doc/core-en_US.xml"
507 validate-docs: doc/core-en_US.xml
508 ifeq ($(XMLSTARLET)$(XMLLINT),::)
509 @echo "--------------------------------------------------------------------------"
510 @echo "--- Please install xmllint or xmlstarlet to validate the documentation ---"
511 @echo "--------------------------------------------------------------------------"
514 $(XMLLINT) --dtdvalid doc/appdocsxml.dtd --noout $<
516 $(XMLSTARLET) val -d doc/appdocsxml.dtd $<
521 @if [ -d .svn ]; then \
522 echo "Updating from Subversion..." ; \
523 fromrev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
524 svn update | tee update.out; \
525 torev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
526 echo "`date` Updated from revision $${fromrev} to $${torev}." >> update.log; \
528 if [ `grep -c ^C update.out` -gt 0 ]; then \
529 echo ; echo "The following files have conflicts:" ; \
530 grep ^C update.out | cut -b4- ; \
534 echo "Not under version control"; \
537 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
538 OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
539 INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
540 "$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \
541 "$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \
542 "$(ASTSPOOLDIR)/voicemail" "$(ASTSPOOLDIR)/recording" \
543 "$(ASTHEADERDIR)" "$(ASTHEADERDIR)/doxygen" \
544 "$(ASTLOGDIR)" "$(ASTLOGDIR)/cdr-csv" "$(ASTLOGDIR)/cdr-custom" \
545 "$(ASTLOGDIR)/cel-custom" "$(ASTDATADIR)" "$(ASTDATADIR)/documentation" \
546 "$(ASTDATADIR)/documentation/thirdparty" "$(ASTDATADIR)/firmware" \
547 "$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \
548 "$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/rest-api" "$(ASTDATADIR)/static-http" \
549 "$(ASTDATADIR)/sounds" "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)"
552 @for i in $(INSTALLDIRS); do \
553 if [ ! -z "$${i}" -a ! -d "$(DESTDIR)$${i}" ]; then \
554 $(INSTALL) -d "$(DESTDIR)$${i}"; \
559 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main bininstall
561 bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
562 $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
563 $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
564 if [ ! -f /sbin/launchd ]; then \
565 cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;s|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;' > contrib/scripts/safe.tmp ; \
566 $(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
567 rm -f contrib/scripts/safe.tmp ; \
569 $(INSTALL) -m 644 include/asterisk.h "$(DESTDIR)$(includedir)"
570 $(INSTALL) -m 644 include/asterisk/*.h "$(DESTDIR)$(ASTHEADERDIR)"
571 $(INSTALL) -m 644 include/asterisk/doxygen/*.h "$(DESTDIR)$(ASTHEADERDIR)/doxygen"
572 if [ -n "$(OLDHEADERS)" ]; then \
573 for h in $(OLDHEADERS); do rm -f "$(DESTDIR)$(ASTHEADERDIR)/$$h"; done \
576 $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
577 $(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/documentation"
578 $(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
579 $(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
580 $(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"
581 $(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
582 $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
583 if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
584 $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
588 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
590 NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
591 OLDMODS=$(filter-out $(NEWMODS) $(notdir $(DESTDIR)$(ASTMODDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTMODDIR)/*.so)))
594 @if [ -n "$(OLDMODS)" ]; then \
595 echo " WARNING WARNING WARNING" ;\
597 echo " Your Asterisk modules directory, located at" ;\
598 echo " $(DESTDIR)$(ASTMODDIR)" ;\
599 echo " contains modules that were not installed by this " ;\
600 echo " version of Asterisk. Please ensure that these" ;\
601 echo " modules are compatible with this version before" ;\
602 echo " attempting to run Asterisk." ;\
604 for f in $(OLDMODS); do \
608 echo " WARNING WARNING WARNING" ;\
612 ifneq ($(findstring ~,$(DESTDIR)),)
613 @echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")."
614 @echo "Try replacing ~ with \$$HOME, as in \"make install DESTDIR=\$$HOME/path\"."
618 install: badshell bininstall datafiles
619 @if [ -x /usr/sbin/asterisk-post-install ]; then \
620 /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
622 @echo " +---- Asterisk Installation Complete -------+"
624 @echo " + YOU MUST READ THE SECURITY DOCUMENT +"
626 @echo " + Asterisk has successfully been installed. +"
627 @echo " + If you would like to install the sample +"
628 @echo " + configuration files (overwriting any +"
629 @echo " + existing config files), run: +"
631 @echo " + $(mK) samples +"
633 @echo " +----------------- or ---------------------+"
635 @echo " + You can go ahead and install the asterisk +"
636 @echo " + program documentation now or later run: +"
638 @echo " + $(mK) progdocs +"
640 @echo " + **Note** This requires that you have +"
641 @echo " + doxygen installed on your local system +"
642 @echo " +-------------------------------------------+"
643 @$(MAKE) -s oldmodcheck
649 # XXX why *.adsi is installed first ?
651 @echo Installing adsi config files...
652 $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
653 @for x in configs/*.adsi; do \
654 dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
655 if [ -f "$${dst}" ] ; then \
656 echo "Overwriting $$x" ; \
658 echo "Installing $$x" ; \
660 $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
664 @echo Installing other config files...
665 @for x in configs/*.sample; do \
666 dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
667 if [ -f "$${dst}" ]; then \
668 if [ "$(OVERWRITE)" = "y" ]; then \
669 if cmp -s "$${dst}" "$$x" ; then \
670 echo "Config file $$x is unchanged"; \
673 mv -f "$${dst}" "$${dst}.old" ; \
675 echo "Skipping config file $$x"; \
679 echo "Installing file $$x"; \
680 $(INSTALL) -m 644 "$$x" "$${dst}" ;\
682 if [ "$(OVERWRITE)" = "y" ]; then \
683 echo "Updating asterisk.conf" ; \
684 sed -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \
685 -e 's|^astmoddir.*$$|astmoddir => $(ASTMODDIR)|' \
686 -e 's|^astvarlibdir.*$$|astvarlibdir => $(ASTVARLIBDIR)|' \
687 -e 's|^astdbdir.*$$|astdbdir => $(ASTDBDIR)|' \
688 -e 's|^astkeydir.*$$|astkeydir => $(ASTKEYDIR)|' \
689 -e 's|^astdatadir.*$$|astdatadir => $(ASTDATADIR)|' \
690 -e 's|^astagidir.*$$|astagidir => $(AGI_DIR)|' \
691 -e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
692 -e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
693 -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
694 -e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \
695 "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
696 $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
697 rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
699 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
700 build_tools/make_sample_voicemail "$(DESTDIR)/$(ASTDATADIR)" "$(DESTDIR)/$(ASTSPOOLDIR)"
702 @for x in phoneprov/*; do \
703 dst="$(DESTDIR)$(ASTDATADIR)/$$x" ; \
704 if [ -f "$${dst}" ]; then \
705 if [ "$(OVERWRITE)" = "y" ]; then \
706 if cmp -s "$${dst}" "$$x" ; then \
707 echo "Config file $$x is unchanged"; \
710 mv -f "$${dst}" "$${dst}.old" ; \
712 echo "Skipping config file $$x"; \
716 echo "Installing file $$x"; \
717 $(INSTALL) -m 644 "$$x" "$${dst}" ;\
721 @[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
722 @[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
723 $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
724 $(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
725 for x in images/*.gif; do \
726 $(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
728 @echo " +--------- Asterisk Web Voicemail ----------+"
730 @echo " + Asterisk Web Voicemail is installed in +"
731 @echo " + your cgi-bin directory: +"
732 @echo " + $(DESTDIR)$(HTTP_CGIDIR)"
733 @echo " + IT USES A SETUID ROOT PERL SCRIPT, SO +"
734 @echo " + IF YOU DON'T LIKE THAT, UNINSTALL IT! +"
736 @echo " + Other static items have been stored in: +"
737 @echo " + $(DESTDIR)$(HTTP_DOCSDIR)"
739 @echo " + If these paths do not match your httpd +"
740 @echo " + installation, correct the definitions +"
741 @echo " + in your Makefile of HTTP_CGIDIR and +"
742 @echo " + HTTP_DOCSDIR +"
744 @echo " +-------------------------------------------+"
747 # Note, Makefile conditionals must not be tabbed out. Wasted hours with that.
749 @echo "Doxygen is not installed. Please install and re-run the configuration script."
752 @echo "DOT is not installed. Doxygen will not produce any diagrams. Please install and re-run the configuration script."
755 @echo "HAVE_DOT = YES" >> contrib/asterisk-ng-doxygen
757 # Set Doxygen PROJECT_NUMBER variable
758 ifneq ($(ASTERISKVERSION),UNKNOWN__and_probably_unsupported)
759 @echo "PROJECT_NUMBER = $(ASTERISKVERSION)" >> contrib/asterisk-ng-doxygen
761 echo "Asterisk Version is unknown, not configuring Doxygen PROJECT_NUMBER."
763 # Validate Doxygen Configuration
764 @doxygen -u contrib/asterisk-ng-doxygen
766 @doxygen contrib/asterisk-ng-doxygen
767 # Remove configuration backup file
768 @rm -f contrib/asterisk-ng-doxygen.bak
772 if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
773 $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ; \
775 sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
776 $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTETCDIR)/../logrotate.d/asterisk"
777 rm -f contrib/scripts/asterisk.logrotate.tmp
780 @if [ "${OSARCH}" = "linux-gnu" ]; then \
781 if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
782 cat contrib/init.d/rc.redhat.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
783 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
784 rm -f contrib/init.d/rc.asterisk.tmp ; \
785 if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
786 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
788 if [ -z "$(DESTDIR)" ] ; then \
789 /sbin/chkconfig --add asterisk ; \
791 elif [ -f /etc/debian_version ] ; then \
792 cat contrib/init.d/rc.debian.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
793 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
794 rm -f contrib/init.d/rc.asterisk.tmp ; \
795 if [ ! -f "$(DESTDIR)/etc/default/asterisk" ] ; then \
796 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/default/asterisk" ; \
798 if [ -z "$(DESTDIR)" ] ; then \
799 /usr/sbin/update-rc.d asterisk defaults 50 91 ; \
801 elif [ -f /etc/gentoo-release ] ; then \
802 cat contrib/init.d/rc.gentoo.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
803 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
804 rm -f contrib/init.d/rc.asterisk.tmp ; \
805 if [ -z "$(DESTDIR)" ] ; then \
806 /sbin/rc-update add asterisk default ; \
808 elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
809 cat contrib/init.d/rc.mandriva.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
810 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
811 rm -f contrib/init.d/rc.asterisk.tmp ; \
812 if [ ! -f /etc/sysconfig/asterisk ] ; then \
813 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
815 if [ -z "$(DESTDIR)" ] ; then \
816 /sbin/chkconfig --add asterisk ; \
818 elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
819 cat contrib/init.d/rc.suse.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
820 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ;\
821 rm -f contrib/init.d/rc.asterisk.tmp ; \
822 if [ ! -f /etc/sysconfig/asterisk ] ; then \
823 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
825 if [ -z "$(DESTDIR)" ] ; then \
826 /sbin/chkconfig --add asterisk ; \
828 elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
829 cat contrib/init.d/rc.archlinux.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
830 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/asterisk" ; \
831 rm -f contrib/init.d/rc.asterisk.tmp ; \
832 elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
833 if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
834 sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.asterisk.plist > asterisk.plist ; \
835 $(INSTALL) -m 644 asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
836 rm -f asterisk.plist; \
838 if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
839 sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.muted.plist > muted.plist ; \
840 $(INSTALL) -m 644 muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
843 elif [ -f /etc/slackware-version ]; then \
844 echo "Slackware is not currently supported, although an init script does exist for it."; \
846 echo "We could not install init scripts for your distribution." ; \
849 echo "We could not install init scripts for your operating system." ; \
853 $(MAKE) -C sounds all
855 # If the cleancount has been changed, force a make clean.
856 # .cleancount is the global clean count, and .lastclean is the
857 # last clean count we had
859 .lastclean: .cleancount
861 @[ -f "$(DESTDIR)$(ASTDBDIR)/astdb.sqlite3" ] || [ ! -f "$(DESTDIR)$(ASTDBDIR)/astdb" ] || [ ! -f menuselect.makeopts ] || grep -q MENUSELECT_UTILS=.*astdb2sqlite3 menuselect.makeopts || (sed -i.orig -e's/MENUSELECT_UTILS=\(.*\)/MENUSELECT_UTILS=\1 astdb2sqlite3/' menuselect.makeopts && echo "Updating menuselect.makeopts to include astdb2sqlite3" && echo "Original version backed up to menuselect.makeopts.orig")
863 $(SUBDIRS_UNINSTALL):
864 +@$(SUBMAKE) -C $(@:-uninstall=) uninstall
867 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main binuninstall
869 _uninstall: $(SUBDIRS_UNINSTALL) main-binuninstall
870 rm -f "$(DESTDIR)$(ASTMODDIR)/"*
871 rm -f "$(DESTDIR)$(ASTSBINDIR)/astgenkey"
872 rm -f "$(DESTDIR)$(ASTSBINDIR)/autosupport"
873 rm -rf "$(DESTDIR)$(ASTHEADERDIR)"
874 rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
875 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
876 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
877 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
878 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"
879 $(MAKE) -C sounds uninstall
881 uninstall: _uninstall
882 @echo " +--------- Asterisk Uninstall Complete -----+"
883 @echo " + Asterisk binaries, sounds, man pages, +"
884 @echo " + headers, modules, and firmware builds, +"
885 @echo " + have all been uninstalled. +"
887 @echo " + To remove ALL traces of Asterisk, +"
888 @echo " + including configuration, spool +"
889 @echo " + directories, and logs, run the following +"
890 @echo " + command: +"
892 @echo " + $(mK) uninstall-all +"
893 @echo " +-------------------------------------------+"
895 uninstall-all: _uninstall
896 rm -rf "$(DESTDIR)$(ASTMODDIR)"
897 rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
898 rm -rf "$(DESTDIR)$(ASTDATADIR)"
899 rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
900 rm -rf "$(DESTDIR)$(ASTETCDIR)"
901 rm -rf "$(DESTDIR)$(ASTLOGDIR)"
903 menuconfig: menuselect
905 cmenuconfig: cmenuselect
907 gmenuconfig: gmenuselect
909 nmenuconfig: nmenuselect
911 menuselect: menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect
912 @if [ -x menuselect/nmenuselect ]; then \
913 $(MAKE) nmenuselect; \
914 elif [ -x menuselect/cmenuselect ]; then \
915 $(MAKE) cmenuselect; \
916 elif [ -x menuselect/gmenuselect ]; then \
917 $(MAKE) gmenuselect; \
919 echo "No menuselect user interface found. Install ncurses,"; \
920 echo "newt or GTK libraries to build one and re-rerun"; \
921 echo "'./configure' and 'make menuselect'."; \
924 cmenuselect: menuselect/cmenuselect menuselect-tree menuselect.makeopts
925 -@menuselect/cmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
927 gmenuselect: menuselect/gmenuselect menuselect-tree menuselect.makeopts
928 -@menuselect/gmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
930 nmenuselect: menuselect/nmenuselect menuselect-tree menuselect.makeopts
931 -@menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
933 # options for make in menuselect/
934 MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" \
935 CFLAGS="$(BUILD_CFLAGS)" LDFLAGS="$(BUILD_LDFLAGS)" \
936 $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
938 menuselect/menuselect: menuselect/makeopts .lastclean
939 +$(MAKE_MENUSELECT) menuselect
941 menuselect/cmenuselect: menuselect/makeopts .lastclean
942 +$(MAKE_MENUSELECT) cmenuselect
944 menuselect/gmenuselect: menuselect/makeopts .lastclean
945 +$(MAKE_MENUSELECT) gmenuselect
947 menuselect/nmenuselect: menuselect/makeopts .lastclean
948 +$(MAKE_MENUSELECT) nmenuselect
950 menuselect/makeopts: makeopts .lastclean
951 +$(MAKE_MENUSELECT) makeopts
953 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml utils/utils.xml agi/agi.xml configure makeopts
954 @echo "Generating input for menuselect ..."
955 @echo "<?xml version=\"1.0\"?>" > $@
957 @echo "<menu name=\"Asterisk Module and Build Option Selection\">" >> $@
958 +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
959 @cat build_tools/cflags.xml >> $@
960 +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
961 @if [ "${AST_DEVMODE}" = "yes" ]; then \
962 cat build_tools/cflags-devmode.xml >> $@; \
964 @cat utils/utils.xml >> $@
965 @cat agi/agi.xml >> $@
966 @cat build_tools/embed_modules.xml >> $@
967 @cat sounds/sounds.xml >> $@
968 @echo "</menu>" >> $@
970 # We don't want to require Python or Pystache for every build, so this is its
974 @echo "--------------------------------------------------------------------------"
975 @echo "--- Please install python to build ARI stubs ---"
976 @echo "--------------------------------------------------------------------------"
979 $(PYTHON) rest-api-templates/make_ari_stubs.py \
980 rest-api/resources.json .
996 .PHONY: uninstall-all
997 .PHONY: dont-optimize
1000 .PHONY: validate-docs
1003 .PHONY: $(SUBDIRS_INSTALL)
1004 .PHONY: $(SUBDIRS_DIST_CLEAN)
1005 .PHONY: $(SUBDIRS_CLEAN)
1006 .PHONY: $(SUBDIRS_UNINSTALL)
1008 .PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT)
1009 .PHONY: $(MOD_SUBDIRS_EMBED_LDFLAGS)
1010 .PHONY: $(MOD_SUBDIRS_EMBED_LIBS)