2 # Asterisk -- A telephony toolkit for Linux.
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
69 export PROC # Processor type
71 export NOISY_BUILD # Used in Makefile.rules
72 export MENUSELECT_CFLAGS # Options selected in menuselect.
73 export AST_DEVMODE # Set to "yes" for additional compiler
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
96 export WGET_EXTRA_ARGS
100 # even though we could use '-include makeopts' here, use a wildcard
101 # lookup anyway, so that make won't try to build makeopts if it doesn't
102 # exist (other rules will force it to be built if needed)
103 ifneq ($(wildcard makeopts),)
107 # start the primary CFLAGS and LDFLAGS with any that were provided
108 # to the configure script
109 _ASTCFLAGS:=$(CONFIG_CFLAGS)
110 _ASTLDFLAGS:=$(CONFIG_LDFLAGS)
112 # Some build systems, such as the one in openwrt, like to pass custom target
113 # CFLAGS and LDFLAGS in the COPTS and LDOPTS variables; these should also
114 # go before any build-system computed flags, since they are defaults, not
117 _ASTLDFLAGS+=$(LDOPTS)
120 _ASTCFLAGS+=$(LIBXML2_INCLUDE)
122 #Uncomment this to see all build commands instead of 'quiet' output
126 space:=$(empty) $(empty)
127 ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR))
129 # Overwite config files on "make samples"
132 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
135 # Asterisk.conf is located in ASTETCDIR or by using the -C flag
136 # when starting Asterisk
137 ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
138 AGI_DIR=$(ASTDATADIR)/agi-bin
140 # If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
141 HTTP_DOCSDIR=/var/www/html
142 # Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
143 HTTP_CGIDIR=/var/www/cgi-bin
145 # If your platform's linker expects a prefix on symbols generated from compiling C
146 # source files, set LINKER_SYMBOL_PREFIX to that value. On some systems, exported symbols
147 # from C source files are prefixed with '_', for example. If this value is not set
148 # properly, the linker scripts that live in the '*.exports' files in various places
149 # in this tree will unintentionally suppress symbols that should be visible
150 # in the final binary objects.
151 LINKER_SYMBOL_PREFIX=
153 # Uncomment this to use the older DSP routines
154 #_ASTCFLAGS+=-DOLD_DSP_ROUTINES
156 # If the file .asterisk.makeopts is present in your home directory, you can
157 # include all of your favorite menuselect options so that every time you download
158 # a new version of Asterisk, you don't have to run menuselect to set them.
159 # The file /etc/asterisk.makeopts will also be included but can be overridden
160 # by the file in your home directory.
162 GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
163 USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
165 MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
166 OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
168 # Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS
171 ifeq ($(OSARCH),linux-gnu)
172 ifeq ($(PROC),x86_64)
173 # You must have GCC 3.4 to use k8, otherwise use athlon
178 ifeq ($(PROC),sparc64)
179 #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
180 #This works for even old (2.96) versions of gcc and provides a small boost either way.
181 #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
182 #So we go lowest common available by gcc and go a step down, still a step up from
183 #the default as we now have a better instruction set to work with. - Belgarath
185 OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
186 OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
187 OPTIONS+=-fomit-frame-pointer
191 # The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
192 ifeq ($(SUB_PROC),maverick)
193 OPTIONS+=-fsigned-char -mcpu=ep9312
195 ifeq ($(SUB_PROC),xscale)
196 OPTIONS+=-fsigned-char -mcpu=xscale
198 OPTIONS+=-fsigned-char
202 # flag to tell 'ldconfig' to only process specified directories
206 ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
207 ifeq ($(findstring -pipe,$(_ASTCFLAGS) $(ASTCFLAGS)),)
212 ifeq ($(findstring -Wall,$(_ASTCFLAGS) $(ASTCFLAGS)),)
216 _ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
219 ifeq ($(AST_DEVMODE),yes)
222 _ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
223 _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
225 _ASTCFLAGS+=-Wmissing-format-attribute
226 _ASTCFLAGS+=-Wformat=2
227 ADDL_TARGETS+=validate-docs
230 ifneq ($(findstring BSD,$(OSARCH)),)
231 _ASTCFLAGS+=-isystem /usr/local/include
234 ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
235 ifneq ($(AST_MARCH_NATIVE),)
236 _ASTCFLAGS+=$(AST_MARCH_NATIVE)
238 ifneq ($(PROC),ultrasparc)
239 _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
245 _ASTCFLAGS+=-fsigned-char
248 ifeq ($(OSARCH),FreeBSD)
249 ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
251 _ASTCFLAGS+=-march=i686
254 # -V is understood by BSD Make, not by GNU make.
255 BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
256 _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
257 # flag to tell 'ldconfig' to only process specified directories
261 ifeq ($(OSARCH),NetBSD)
262 _ASTCFLAGS+=-pthread -I/usr/pkg/include
265 ifeq ($(OSARCH),OpenBSD)
266 _ASTCFLAGS+=-pthread -ftrampolines
269 ifeq ($(OSARCH),SunOS)
270 _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
273 ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
275 ifneq ($(wildcard .version),)
276 ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
279 ifneq ($(wildcard .svn),)
280 ASTERISKVERSIONNUM:=999999
283 _ASTCFLAGS+=$(OPTIONS)
285 MOD_SUBDIRS:=channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
286 OTHER_SUBDIRS:=utils agi
287 SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
288 SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
289 SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
290 SUBDIRS_DIST_CLEAN:=$(SUBDIRS:%=%-dist-clean)
291 SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
292 MOD_SUBDIRS_EMBED_LDSCRIPT:=$(MOD_SUBDIRS:%=%-embed-ldscript)
293 MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
294 MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
295 MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
297 ifneq ($(findstring darwin,$(OSARCH)),)
298 _ASTCFLAGS+=-D__Darwin__
299 _SOLINK=-Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
300 ifeq ($(shell if test `/usr/bin/sw_vers -productVersion | cut -c4` -gt 5; then echo 6; else echo 0; fi),6)
301 _SOLINK+=/usr/lib/bundle1.o
303 SOLINK=-bundle $(_SOLINK)
304 DYLINK=-Xlinker -dylib $(_SOLINK)
305 _ASTLDFLAGS+=-L/usr/local/lib
307 # These are used for all but Darwin
310 ifneq ($(findstring BSD,$(OSARCH)),)
311 _ASTLDFLAGS+=-L/usr/local/lib
315 ifeq ($(OSARCH),SunOS)
316 SOLINK=-shared -fpic -L/usr/local/ssl/lib -lrt
320 ifeq ($(OSARCH),OpenBSD)
325 # comment to print directories during submakes
328 ifneq ($(INSIDE_EMACS),)
332 SILENTMAKE:=$(MAKE) --quiet --no-print-directory
333 ifneq ($(PRINT_DIR)$(NOISY_BUILD),)
336 SUBMAKE:=$(MAKE) --quiet --no-print-directory
339 # This is used when generating the doxygen documentation
346 # $(MAKE) is printed in several places, and we want it to be a
347 # fixed size string. Define a variable whose name has also the
348 # same size, so we can easily align text.
349 ifeq ($(MAKE), gmake)
356 @echo " +--------- Asterisk Build Complete ---------+"
357 @echo " + Asterisk has successfully been built, and +"
358 @echo " + can be installed by running: +"
360 @echo " + $(mK) install +"
361 @echo " +-------------------------------------------+"
363 # For parallel builds, we must call cleantest *before* running the
364 # other dependencies on _all.
365 _cleantest_all: cleantest
368 _all: makeopts $(SUBDIRS) doc/core-en_US.xml $(ADDL_TARGETS)
372 @echo "**** The configure script must be executed before running '$(MAKE)'."
373 @echo "**** Please run \"./configure\"."
377 menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
378 ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
379 menuselect/menuselect --check-deps $@
380 menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
383 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
384 +@echo "EMBED_LDSCRIPTS+="`$(SILENTMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
386 $(MOD_SUBDIRS_EMBED_LDFLAGS):
387 +@echo "EMBED_LDFLAGS+="`$(SILENTMAKE) -C $(@:-embed-ldflags=) SUBDIR=$(@:-embed-ldflags=) __embed_ldflags` >> makeopts.embed_rules
389 $(MOD_SUBDIRS_EMBED_LIBS):
390 +@echo "EMBED_LIBS+="`$(SILENTMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules
392 $(MOD_SUBDIRS_MENUSELECT_TREE):
393 +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
394 +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
396 makeopts.embed_rules: menuselect.makeopts
397 @echo "Generating embedded module rules ..."
399 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT)
400 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS)
401 +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS)
403 $(SUBDIRS): main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
405 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
407 # ensure that all module subdirectories are processed before 'main' during
408 # a parallel build, since if there are modules selected to be embedded the
409 # directories containing them must be completed before the main Asterisk
410 # binary can be built
411 main: $(filter-out main,$(MOD_SUBDIRS))
413 # Windows: we need to build main (i.e. the asterisk dll) first,
414 # followed by res, followed by the other directories, because
415 # dll symbols must be resolved during linking and not at runtime.
416 D1:= $(filter-out main,$(MOD_SUBDIRS))
417 D1:= $(filter-out res,$(D1))
424 +@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
427 +@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
429 defaults.h: makeopts build_tools/make_defaults_h
430 @build_tools/make_defaults_h > $@.tmp
431 @cmp -s $@.tmp $@ || mv $@.tmp $@
434 main/version.c: FORCE
435 @build_tools/make_version_c > $@.tmp
436 @cmp -s $@.tmp $@ || mv $@.tmp $@
439 include/asterisk/buildopts.h: menuselect.makeopts
440 @build_tools/make_buildopts_h > $@.tmp
441 @cmp -s $@.tmp $@ || mv $@.tmp $@
444 include/asterisk/build.h:
445 @build_tools/make_build_h > $@.tmp
446 @cmp -s $@.tmp $@ || mv $@.tmp $@
450 +@$(SUBMAKE) -C $(@:-clean=) clean
452 $(SUBDIRS_DIST_CLEAN):
453 +@$(SUBMAKE) -C $(@:-dist-clean=) dist-clean
455 clean: $(SUBDIRS_CLEAN) _clean
459 rm -f include/asterisk/build.h
461 @$(MAKE) -C menuselect clean
462 cp -f .cleancount .lastclean
464 dist-clean: distclean
466 distclean: $(SUBDIRS_DIST_CLEAN) _clean
467 @$(MAKE) -C menuselect dist-clean
468 @$(MAKE) -C sounds dist-clean
469 rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
470 rm -f makeopts.embed_rules
471 rm -f config.log config.status config.cache
472 rm -rf autom4te.cache
473 rm -f include/asterisk/autoconfig.h
474 rm -f include/asterisk/buildopts.h
476 rm -f build_tools/menuselect-deps
478 datafiles: _cleantest_all doc/core-en_US.xml
479 CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
480 # Should static HTTP be installed during make samples or even with its own target ala
481 # webvoicemail? There are portions here that *could* be customized but might also be
482 # improved a lot. I'll put it here for now.
484 for x in static-http/*; do \
485 $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/static-http" ; \
487 $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
488 if [ -d doc/tex/asterisk ] ; then \
489 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
490 for n in doc/tex/asterisk/* ; do \
491 $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
494 for x in images/*.jpg; do \
495 $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
497 $(MAKE) -C sounds install
499 doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
500 @printf "Building Documentation For: "
501 @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
502 @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
503 @echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
504 @for x in $(MOD_SUBDIRS); do \
506 for i in $$x/*.c; do \
507 $(AWK) -f build_tools/get_documentation $$i >> $@ ; \
511 @echo "</docs>" >> $@
513 validate-docs: doc/core-en_US.xml
514 ifeq ($(XMLSTARLET)$(XMLLINT),::)
515 @echo "--------------------------------------------------------------------------"
516 @echo "--- Please install xmllint or xmlstarlet to validate the documentation ---"
517 @echo "--------------------------------------------------------------------------"
520 $(XMLLINT) --dtdvalid doc/appdocsxml.dtd --noout $<
522 $(XMLSTARLET) val -d doc/appdocsxml.dtd $<
527 @if [ -d .svn ]; then \
528 echo "Updating from Subversion..." ; \
529 fromrev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
530 svn update | tee update.out; \
531 torev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
532 echo "`date` Updated from revision $${fromrev} to $${torev}." >> update.log; \
534 if [ `grep -c ^C update.out` -gt 0 ]; then \
535 echo ; echo "The following files have conflicts:" ; \
536 grep ^C update.out | cut -b4- ; \
540 echo "Not under version control"; \
543 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
544 OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
547 $(INSTALL) -d "$(DESTDIR)$(ASTLIBDIR)"
548 $(INSTALL) -d "$(DESTDIR)$(ASTMODDIR)"
549 $(INSTALL) -d "$(DESTDIR)$(ASTSBINDIR)"
550 $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
551 $(INSTALL) -d "$(DESTDIR)$(ASTVARRUNDIR)"
552 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)"
553 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate"
554 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/meetme"
555 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/monitor"
556 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/system"
557 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/tmp"
558 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail"
559 $(INSTALL) -d "$(DESTDIR)$(ASTHEADERDIR)"
560 $(INSTALL) -d "$(DESTDIR)$(ASTHEADERDIR)/doxygen"
561 $(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)"
562 $(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-csv"
563 $(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cdr-custom"
564 $(INSTALL) -d "$(DESTDIR)$(ASTLOGDIR)/cel-custom"
565 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)"
566 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/documentation"
567 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/documentation/thirdparty"
568 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/firmware"
569 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/firmware/iax"
570 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/images"
571 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/keys"
572 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/phoneprov"
573 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
574 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/sounds"
575 $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/moh"
576 $(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
577 $(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
578 $(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
581 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main bininstall
583 bininstall: _cleantest_all installdirs $(SUBDIRS_INSTALL) main-bininstall
584 $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
585 $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
586 if [ ! -f "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" -a ! -f /sbin/launchd ]; then \
587 cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;' > contrib/scripts/safe.tmp ; \
588 $(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
589 rm -f contrib/scripts/safe.tmp ; \
591 $(INSTALL) -m 644 include/asterisk.h "$(DESTDIR)$(includedir)"
592 $(INSTALL) -m 644 include/asterisk/*.h "$(DESTDIR)$(ASTHEADERDIR)"
593 $(INSTALL) -m 644 include/asterisk/doxygen/*.h "$(DESTDIR)$(ASTHEADERDIR)/doxygen"
594 if [ -n "$(OLDHEADERS)" ]; then \
595 for h in $(OLDHEADERS); do rm -f "$(DESTDIR)$(ASTHEADERDIR)/$$h"; done \
598 $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
599 $(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
600 $(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
601 $(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"
602 $(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
603 $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
604 if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
605 $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
609 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
611 NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
612 OLDMODS=$(filter-out $(NEWMODS) $(notdir $(DESTDIR)$(ASTMODDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTMODDIR)/*.so)))
615 @if [ -n "$(OLDMODS)" ]; then \
616 echo " WARNING WARNING WARNING" ;\
618 echo " Your Asterisk modules directory, located at" ;\
619 echo " $(DESTDIR)$(ASTMODDIR)" ;\
620 echo " contains modules that were not installed by this " ;\
621 echo " version of Asterisk. Please ensure that these" ;\
622 echo " modules are compatible with this version before" ;\
623 echo " attempting to run Asterisk." ;\
625 for f in $(OLDMODS); do \
629 echo " WARNING WARNING WARNING" ;\
633 ifneq ($(findstring ~,$(DESTDIR)),)
634 @echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")."
635 @echo "Try replacing ~ with \$$HOME, as in \"make install DESTDIR=\$$HOME/path\"."
639 install: badshell bininstall datafiles
640 @if [ -x /usr/sbin/asterisk-post-install ]; then \
641 /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
643 @echo " +---- Asterisk Installation Complete -------+"
645 @echo " + YOU MUST READ THE SECURITY DOCUMENT +"
647 @echo " + Asterisk has successfully been installed. +"
648 @echo " + If you would like to install the sample +"
649 @echo " + configuration files (overwriting any +"
650 @echo " + existing config files), run: +"
652 @echo " + $(mK) samples +"
654 @echo " +----------------- or ---------------------+"
656 @echo " + You can go ahead and install the asterisk +"
657 @echo " + program documentation now or later run: +"
659 @echo " + $(mK) progdocs +"
661 @echo " + **Note** This requires that you have +"
662 @echo " + doxygen installed on your local system +"
663 @echo " +-------------------------------------------+"
664 @$(MAKE) -s oldmodcheck
670 # XXX why *.adsi is installed first ?
672 @echo Installing adsi config files...
673 $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
674 @for x in configs/*.adsi; do \
675 dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
676 if [ -f "$${dst}" ] ; then \
677 echo "Overwriting $$x" ; \
679 echo "Installing $$x" ; \
681 $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
685 @echo Installing other config files...
686 @for x in configs/*.sample; do \
687 dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
688 if [ -f "$${dst}" ]; then \
689 if [ "$(OVERWRITE)" = "y" ]; then \
690 if cmp -s "$${dst}" "$$x" ; then \
691 echo "Config file $$x is unchanged"; \
694 mv -f "$${dst}" "$${dst}.old" ; \
696 echo "Skipping config file $$x"; \
700 echo "Installing file $$x"; \
701 $(INSTALL) -m 644 "$$x" "$${dst}" ;\
703 if [ "$(OVERWRITE)" = "y" ]; then \
704 echo "Updating asterisk.conf" ; \
705 sed -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \
706 -e 's|^astmoddir.*$$|astmoddir => $(ASTMODDIR)|' \
707 -e 's|^astvarlibdir.*$$|astvarlibdir => $(ASTVARLIBDIR)|' \
708 -e 's|^astdbdir.*$$|astdbdir => $(ASTDBDIR)|' \
709 -e 's|^astkeydir.*$$|astkeydir => $(ASTKEYDIR)|' \
710 -e 's|^astdatadir.*$$|astdatadir => $(ASTDATADIR)|' \
711 -e 's|^astagidir.*$$|astagidir => $(AGI_DIR)|' \
712 -e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
713 -e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
714 -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
715 "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
716 $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
717 rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
719 $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
720 build_tools/make_sample_voicemail "$(DESTDIR)/$(ASTDATADIR)" "$(DESTDIR)/$(ASTSPOOLDIR)"
722 @for x in phoneprov/*; do \
723 dst="$(DESTDIR)$(ASTDATADIR)/$$x" ; \
724 if [ -f "$${dst}" ]; then \
725 if [ "$(OVERWRITE)" = "y" ]; then \
726 if cmp -s "$${dst}" "$$x" ; then \
727 echo "Config file $$x is unchanged"; \
730 mv -f "$${dst}" "$${dst}.old" ; \
732 echo "Skipping config file $$x"; \
736 echo "Installing file $$x"; \
737 $(INSTALL) -m 644 "$$x" "$${dst}" ;\
741 @[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
742 @[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
743 $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
744 $(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
745 for x in images/*.gif; do \
746 $(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
748 @echo " +--------- Asterisk Web Voicemail ----------+"
750 @echo " + Asterisk Web Voicemail is installed in +"
751 @echo " + your cgi-bin directory: +"
752 @echo " + $(DESTDIR)$(HTTP_CGIDIR)"
753 @echo " + IT USES A SETUID ROOT PERL SCRIPT, SO +"
754 @echo " + IF YOU DON'T LIKE THAT, UNINSTALL IT! +"
756 @echo " + Other static items have been stored in: +"
757 @echo " + $(DESTDIR)$(HTTP_DOCSDIR)"
759 @echo " + If these paths do not match your httpd +"
760 @echo " + installation, correct the definitions +"
761 @echo " + in your Makefile of HTTP_CGIDIR and +"
762 @echo " + HTTP_DOCSDIR +"
764 @echo " +-------------------------------------------+"
767 (cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
768 echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
771 if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
772 $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ; \
774 sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
775 $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTETCDIR)/../logrotate.d/asterisk"
776 rm -f contrib/scripts/asterisk.logrotate.tmp
779 @if [ "${OSARCH}" = "linux-gnu" ]; then \
780 if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
781 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 ; \
782 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
783 rm -f contrib/init.d/rc.asterisk.tmp ; \
784 if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
785 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
787 if [ -z "$(DESTDIR)" ] ; then \
788 /sbin/chkconfig --add asterisk ; \
790 elif [ -f /etc/debian_version ] ; then \
791 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 ; \
792 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
793 rm -f contrib/init.d/rc.asterisk.tmp ; \
794 if [ ! -f "$(DESTDIR)/etc/default/asterisk" ] ; then \
795 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/default/asterisk" ; \
797 if [ -z "$(DESTDIR)" ] ; then \
798 /usr/sbin/update-rc.d asterisk defaults 50 91 ; \
800 elif [ -f /etc/gentoo-release ] ; then \
801 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 ; \
802 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
803 rm -f contrib/init.d/rc.asterisk.tmp ; \
804 if [ -z "$(DESTDIR)" ] ; then \
805 /sbin/rc-update add asterisk default ; \
807 elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
808 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 ; \
809 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
810 rm -f contrib/init.d/rc.asterisk.tmp ; \
811 if [ ! -f /etc/sysconfig/asterisk ] ; then \
812 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
814 if [ -z "$(DESTDIR)" ] ; then \
815 /sbin/chkconfig --add asterisk ; \
817 elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
818 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 ; \
819 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ;\
820 rm -f contrib/init.d/rc.asterisk.tmp ; \
821 if [ ! -f /etc/sysconfig/asterisk ] ; then \
822 $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
824 if [ -z "$(DESTDIR)" ] ; then \
825 /sbin/chkconfig --add asterisk ; \
827 elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
828 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 ; \
829 $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/asterisk" ; \
830 rm -f contrib/init.d/rc.asterisk.tmp ; \
831 elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
832 if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
833 sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.asterisk.plist > asterisk.plist ; \
834 $(INSTALL) -m 644 asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
835 rm -f asterisk.plist; \
837 if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
838 sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.muted.plist > muted.plist ; \
839 $(INSTALL) -m 644 muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
842 elif [ -f /etc/slackware-version ]; then \
843 echo "Slackware is not currently supported, although an init script does exist for it."; \
845 echo "We could not install init scripts for your distribution." ; \
848 echo "We could not install init scripts for your operating system." ; \
852 $(MAKE) -C sounds all
854 # If the cleancount has been changed, force a make clean.
855 # .cleancount is the global clean count, and .lastclean is the
856 # last clean count we had
859 @cmp -s .cleancount .lastclean || $(MAKE) clean
860 @[ -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")
862 $(SUBDIRS_UNINSTALL):
863 +@$(SUBMAKE) -C $(@:-uninstall=) uninstall
866 +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main binuninstall
868 _uninstall: $(SUBDIRS_UNINSTALL) main-binuninstall
869 rm -f "$(DESTDIR)$(ASTMODDIR)/"*
870 rm -f "$(DESTDIR)$(ASTSBINDIR)/astgenkey"
871 rm -f "$(DESTDIR)$(ASTSBINDIR)/autosupport"
872 rm -rf "$(DESTDIR)$(ASTHEADERDIR)"
873 rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
874 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
875 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
876 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
877 rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"
878 $(MAKE) -C sounds uninstall
880 uninstall: _uninstall
881 @echo " +--------- Asterisk Uninstall Complete -----+"
882 @echo " + Asterisk binaries, sounds, man pages, +"
883 @echo " + headers, modules, and firmware builds, +"
884 @echo " + have all been uninstalled. +"
886 @echo " + To remove ALL traces of Asterisk, +"
887 @echo " + including configuration, spool +"
888 @echo " + directories, and logs, run the following +"
889 @echo " + command: +"
891 @echo " + $(mK) uninstall-all +"
892 @echo " +-------------------------------------------+"
894 uninstall-all: _uninstall
895 rm -rf "$(DESTDIR)$(ASTMODDIR)"
896 rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
897 rm -rf "$(DESTDIR)$(ASTDATADIR)"
898 rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
899 rm -rf "$(DESTDIR)$(ASTETCDIR)"
900 rm -rf "$(DESTDIR)$(ASTLOGDIR)"
902 menuconfig: menuselect
904 cmenuconfig: cmenuselect
906 gmenuconfig: gmenuselect
908 nmenuconfig: nmenuselect
910 menuselect: menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect
911 @if [ -x menuselect/nmenuselect ]; then \
912 $(MAKE) nmenuselect; \
913 elif [ -x menuselect/cmenuselect ]; then \
914 $(MAKE) cmenuselect; \
915 elif [ -x menuselect/gmenuselect ]; then \
916 $(MAKE) gmenuselect; \
918 echo "No menuselect user interface found. Install ncurses,"; \
919 echo "newt or GTK libraries to build one and re-rerun"; \
920 echo "'./configure' and 'make menuselect'."; \
923 cmenuselect: menuselect/cmenuselect menuselect-tree menuselect.makeopts
924 -@menuselect/cmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
926 gmenuselect: menuselect/gmenuselect menuselect-tree menuselect.makeopts
927 -@menuselect/gmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
929 nmenuselect: menuselect/nmenuselect menuselect-tree menuselect.makeopts
930 -@menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
932 # options for make in menuselect/
933 MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
935 menuselect/menuselect: menuselect/makeopts
936 +$(MAKE_MENUSELECT) menuselect
938 menuselect/cmenuselect: menuselect/makeopts
939 +$(MAKE_MENUSELECT) cmenuselect
941 menuselect/gmenuselect: menuselect/makeopts
942 +$(MAKE_MENUSELECT) gmenuselect
944 menuselect/nmenuselect: menuselect/makeopts
945 +$(MAKE_MENUSELECT) nmenuselect
947 menuselect/makeopts: makeopts
948 +$(MAKE_MENUSELECT) makeopts
950 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
951 @echo "Generating input for menuselect ..."
952 @echo "<?xml version=\"1.0\"?>" > $@
954 @echo "<menu name=\"Asterisk Module and Build Option Selection\">" >> $@
955 +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
956 @cat build_tools/cflags.xml >> $@
957 +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
958 @if [ "${AST_DEVMODE}" = "yes" ]; then \
959 cat build_tools/cflags-devmode.xml >> $@; \
961 @cat utils/utils.xml >> $@
962 @cat agi/agi.xml >> $@
963 @cat build_tools/embed_modules.xml >> $@
964 @cat sounds/sounds.xml >> $@
965 @echo "</menu>" >> $@
975 .PHONY: _cleantest_all
980 .PHONY: uninstall-all
981 .PHONY: dont-optimize
984 .PHONY: validate-docs
986 .PHONY: $(SUBDIRS_INSTALL)
987 .PHONY: $(SUBDIRS_DIST_CLEAN)
988 .PHONY: $(SUBDIRS_CLEAN)
989 .PHONY: $(SUBDIRS_UNINSTALL)
991 .PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT)
992 .PHONY: $(MOD_SUBDIRS_EMBED_LDFLAGS)
993 .PHONY: $(MOD_SUBDIRS_EMBED_LIBS)