048f986d34917c62e62625d925131ae467d35ded
[asterisk/asterisk.git] / Makefile
1 #
2 # Asterisk -- A telephony toolkit for Linux.
3
4 # Top level Makefile
5 #
6 # Copyright (C) 1999-2006, Digium, Inc.
7 #
8 # Mark Spencer <markster@digium.com>
9 #
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
12 #
13
14 .EXPORT_ALL_VARIABLES:
15
16 # Create OPTIONS variable
17 OPTIONS=
18
19 # If cross compiling, define these to suit
20 #CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-
21 #CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/
22 #CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target
23 #CROSS_ARCH=Linux
24 #CROSS_PROC=arm
25 #SUB_PROC=xscale # or maverick
26
27 # Pentium Pro Optimize
28 #PROC=i686
29
30 # Pentium & VIA processors optimize
31 #PROC=i586
32
33 #PROC=k6
34 #PROC=ppc
35
36 CC=$(CROSS_COMPILE)gcc
37 HOST_CC=gcc
38
39 ifeq ($(CROSS_COMPILE),)
40   OSARCH=$(shell uname -s)
41   PROC?=$(shell uname -m)
42 else
43   OSARCH=$(CROSS_ARCH)
44   PROC=$(CROSS_PROC)
45 endif
46
47 PWD=$(shell pwd)
48
49 # Remember the MAKELEVEL at the top
50 MAKETOPLEVEL?=$(MAKELEVEL)
51
52 ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
53 # More GSM codec optimization
54 # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
55 # which support MMX instructions.  This should be newer pentiums,
56 # ppro's, etc, as well as the AMD K6 and K7.  
57 #K6OPT  = -DK6OPT
58
59 # Tell gcc to optimize the code
60 OPTIMIZE+=-O6
61 else
62   # Stack backtraces, while useful for debugging, are incompatible with optimizations
63   ifeq (${OSARCH},Linux)
64     CFLAGS+=-DSTACK_BACKTRACES
65   endif
66 endif
67
68 # Overwite config files on "make samples"
69 OVERWRITE=y
70
71 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
72 DEBUG=-g3 #-pg
73
74 # Set NOCRYPTO to yes if you do not want to have crypto support or dependencies
75 #NOCRYPTO=yes
76
77 # If you are running a radio application, define RADIO_RELAX so that the DTMF
78 # will be received more reliably
79 #OPTIONS += -DRADIO_RELAX
80
81 # If you don't have a lot of memory (e.g. embedded Asterisk), define LOW_MEMORY
82 # to reduce the size of certain static buffers
83 #ifneq ($(CROSS_COMPILE),)
84 #OPTIONS += -DLOW_MEMORY
85 #endif
86
87 # Asterisk SMDI integration
88 WITH_SMDI = 1
89
90 # Optional debugging parameters
91 DEBUG_THREADS = #-DDUMP_SCHEDULER #-DDEBUG_SCHEDULER #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
92
93 # Uncomment next one to enable ast_frame tracing (for debugging)
94 TRACE_FRAMES = #-DTRACE_FRAMES
95
96 # Uncomment next one to enable malloc debugging
97 # You can view malloc debugging with:
98 #   *CLI> show memory allocations [filename]
99 #   *CLI> show memory summary [filename]
100 #
101 MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
102
103 # Where to install asterisk after compiling
104 # Default -> leave empty
105 INSTALL_PREFIX?=
106
107 # Staging directory
108 # Files are copied here temporarily during the install process
109 # For example, make DESTDIR=/tmp/asterisk woud put things in
110 # /tmp/asterisk/etc/asterisk
111 # !!! Watch out, put no spaces or comments after the value !!!
112 DESTDIR?=
113 #DESTDIR?=/tmp/asterisk
114
115 # Original busydetect routine
116 BUSYDETECT = #-DBUSYDETECT
117
118 # Improved busydetect routine, comment the previous one if you use this one
119 BUSYDETECT+= #-DBUSYDETECT_MARTIN 
120 # Detect the busy signal looking only at tone lengths
121 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
122 BUSYDETECT+= #-DBUSYDETECT_TONEONLY
123 # Enforce the detection of busy signal (get rid of false hangups)
124 # Don't use together with -DBUSYDETECT_TONEONLY
125 BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
126
127 ifneq ($(OSARCH),SunOS)
128   ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
129   ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
130   ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
131   ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
132   ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
133   ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
134   ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
135   ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
136   ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
137   ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
138   ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
139   MODULES_DIR=$(ASTLIBDIR)/modules
140   AGI_DIR=$(ASTVARLIBDIR)/agi-bin
141 else
142   ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
143   ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
144   ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
145   ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
146   ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
147   ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
148   ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
149   ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
150   ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
151   ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
152   ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
153   MODULES_DIR=$(ASTLIBDIR)/modules
154   AGI_DIR=$(ASTVARLIBDIR)/agi-bin
155 endif
156
157 ASTCFLAGS=
158
159 # Define this to use files larger than 2GB (useful for sound files longer than 37 hours and logfiles)
160 ASTCFLAGS+=-D_FILE_OFFSET_BITS=64
161
162 # Uncomment this to use the older DSP routines
163 #ASTCFLAGS+=-DOLD_DSP_ROUTINES
164
165 # Determine by a grep 'DocumentRoot' of your httpd.conf file
166 HTTP_DOCSDIR=/var/www/html
167 # Determine by a grep 'ScriptAlias' of your httpd.conf file
168 HTTP_CGIDIR=/var/www/cgi-bin
169
170 # If the file .asterisk.makeopts is present in your home directory, you can
171 # include all of your favorite Makefile options so that every time you download
172 # a new version of Asterisk, you don't have to edit the makefile to set them. 
173 # The file, /etc/asterisk.makeopts will also be included, but can be overridden
174 # by the file in your home directory.
175
176 ifneq ($(wildcard /etc/asterisk.makeopts),)
177   include /etc/asterisk.makeopts
178 endif
179
180 ifneq ($(wildcard ~/.asterisk.makeopts),)
181   include ~/.asterisk.makeopts
182 endif
183
184 ifeq ($(OSARCH),Linux)
185   ifeq ($(PROC),x86_64)
186     # You must have GCC 3.4 to use k8, otherwise use athlon
187     PROC=k8
188     #PROC=athlon
189     OPTIONS+=-m64
190   endif
191
192   ifeq ($(PROC),sparc64)
193     #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
194     #This works for even old (2.96) versions of gcc and provides a small boost either way.
195     #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
196     #So we go lowest common available by gcc and go a step down, still a step up from
197     #the default as we now have a better instruction set to work with. - Belgarath
198     PROC=ultrasparc
199     OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
200     OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
201     OPTIONS+=-fomit-frame-pointer
202   endif
203
204   ifeq ($(PROC),arm)
205     # The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
206     ifeq ($(SUB_PROC),maverick)
207       OPTIONS+=-fsigned-char -mcpu=ep9312
208     else
209       ifeq ($(SUB_PROC),xscale)
210         OPTIONS+=-fsigned-char -msoft-float -mcpu=xscale
211       else
212         OPTIONS+=-fsigned-char -msoft-float 
213       endif
214     endif
215   endif
216   MPG123TARG=linux
217 endif
218
219 GREP=grep
220 ID=id
221
222 ifeq ($(OSARCH),SunOS)
223   GREP=/usr/xpg4/bin/grep
224   M4=/usr/local/bin/m4
225   ID=/usr/xpg4/bin/id
226 endif
227
228 INCLUDE+=-Iinclude -I../include
229 ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
230 ASTCFLAGS+=$(OPTIMIZE)
231 ASTCFLAGS+=# -Werror -Wunused
232 ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
233 ASTCFLAGS+= -Wno-pointer-sign
234 endif
235 ASTOBJ=-o asterisk
236
237 ifeq ($(findstring BSD,$(OSARCH)),BSD)
238   ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
239 endif
240
241 ifneq ($(PROC),ultrasparc)
242   ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
243 endif
244
245 ifeq ($(PROC),ppc)
246   ASTCFLAGS+=-fsigned-char
247 endif
248
249 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),)
250   ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/local/include/osp
251 else
252   ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
253     ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/include/osp
254   endif
255 endif
256
257 ifeq ($(OSARCH),FreeBSD)
258   BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
259   ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
260   LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
261   ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
262     ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
263   endif
264   MPG123TARG=freebsd
265
266   # XXX FreeBSD paths
267   PREFIX?=/usr/local
268   ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
269   ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
270   ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
271   ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
272   ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
273   ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
274   ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
275   ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
276   ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
277   ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
278   ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
279   # XXX end FreeBSD paths
280
281 endif # FreeBSD
282
283 ifeq ($(OSARCH),NetBSD)
284   ASTCFLAGS+=-pthread
285   INCLUDE+=-I$(CROSS_COMPILE_TARGET)/usr/pkg/include
286   MPG123TARG=netbsd
287 endif
288
289 ifeq ($(OSARCH),OpenBSD)
290   ASTCFLAGS+=-pthread
291 endif
292
293 ifeq ($(OSARCH),SunOS)
294   ASTCFLAGS+=-Wcast-align -DSOLARIS
295   INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
296 endif
297
298 ifeq ($(findstring CYGWIN,$(OSARCH)),CYGWIN)
299   CYGLOADER=cygwin_a
300   OSARCH=CYGWIN
301   ASTOBJ=-shared -o asterisk.dll -Wl,--out-implib=libasterisk.dll.a -Wl,--export-all-symbols
302   ASTLINK=
303   LIBS+=-lpthread -lncurses -lm -lresolv
304   ASTSBINDIR=$(MODULES_DIR)
305 endif
306
307 ifndef WITHOUT_ZAPTEL
308
309 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
310   ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
311 endif
312
313 endif # WITHOUT_ZAPTEL
314
315 LIBEDIT=editline/libedit.a
316
317 ifneq ($(wildcard .version),)
318   ASTERISKVERSION:=$(shell cat .version)
319   ASTERISKVERSIONNUM:=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
320   RPMVERSION:=$(shell sed 's/[-\/:]/_/g' .version)
321 else
322   RPMVERSION=unknown
323 endif
324
325 # CVS mirrors of SVN have .svnrevision files showing
326 # which SVN revision they are based on, and .svnbranch
327 # showing the branch they are made from
328 ifneq ($(wildcard .svnrevision),)
329   ASTERISKVERSIONNUM=999999
330   ASTERISKVERSION:=SVN-$(shell cat .svnbranch)-r$(shell cat .svnrevision)
331 else
332   ifneq ($(wildcard .svn),)
333     ASTERISKVERSIONNUM=999999
334     ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
335   endif
336 endif
337
338 ASTCFLAGS+= $(DEBUG_THREADS)
339 ASTCFLAGS+= $(TRACE_FRAMES)
340 ASTCFLAGS+= $(MALLOC_DEBUG)
341 ASTCFLAGS+= $(BUSYDETECT)
342 ASTCFLAGS+= $(OPTIONS)
343 ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
344 ASTCFLAGS+= -fomit-frame-pointer 
345 endif
346
347 SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
348
349 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
350         translate.o file.o pbx.o cli.o md5.o term.o \
351         ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
352         cdr.o tdd.o acl.o rtp.o udptl.o manager.o asterisk.o \
353         dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
354         astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
355         utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
356         netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
357         cryptostub.o sha1.o http.o
358
359 # we need to link in the objects statically, not as a library, because
360 # otherwise modules will not have them available if none of the static
361 # objects use it.
362 OBJS+= stdtime/localtime.o
363
364 # At the moment say.o is an optional component which can be overridden
365 # by a module.
366 OBJS+= say.o
367
368 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
369   OBJS+= poll.o
370   ASTCFLAGS+=-DPOLLCOMPAT
371 endif
372
373 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
374   OBJS+= dlfcn.o
375   ASTCFLAGS+=-DDLFCNCOMPAT
376 endif
377
378 ifeq ($(OSARCH),Linux)
379   LIBS+=-ldl -lpthread -lncurses -lm -lresolv  #-lnjamd
380 else
381   LIBS+=-lncurses -lm
382 endif
383
384 ifeq ($(OSARCH),Darwin)
385   LIBS+=-lresolv
386   ASTCFLAGS+=-D__Darwin__
387   AUDIO_LIBS=-framework CoreAudio
388   ASTLINK=-Wl,-dynamic
389   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
390   # Mac on Intel CoreDuo does not need poll compatibility layer
391   ifneq ($(PROC),i386)
392     OBJS+=poll.o
393     ASTCFLAGS+=-DPOLLCOMPAT
394   endif
395 else
396 # These are used for all but Darwin
397   ASTLINK=-Wl,-E 
398   SOLINK=-shared -Xlinker -x
399   ifeq ($(findstring BSD,$(OSARCH)),BSD)
400     SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
401   endif
402 endif
403
404 ifeq ($(OSARCH),FreeBSD)
405   LIBS+=-lcrypto
406 endif
407
408 ifeq ($(OSARCH),NetBSD)
409   LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib -lncurses
410 endif
411
412 ifeq ($(OSARCH),OpenBSD)
413   LIBS+=-lcrypto -lpthread -lm -lncurses
414 endif
415
416 ifeq ($(OSARCH),SunOS)
417   LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
418   OBJS+=strcompat.o
419   ASTLINK=
420   SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
421 endif
422
423 ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
424   CFLAGS+=$(ASTCFLAGS)
425 endif
426
427 # This is used when generating the doxygen documentation
428 ifneq ($(wildcard /usr/local/bin/dot)$(wildcard /usr/bin/dot),)
429   HAVEDOT=yes
430 else
431   HAVEDOT=no
432 endif
433
434 INSTALL=install
435
436 CFLAGS+=-DT38_SUPPORT
437
438 _all: all
439         @echo " +--------- Asterisk Build Complete ---------+"  
440         @echo " + Asterisk has successfully been built, but +"  
441         @echo " + cannot be run before being installed by   +"  
442         @echo " + running:                                  +"  
443         @echo " +                                           +"
444         @echo " +               $(MAKE) install                +"  
445         @echo " +-------------------------------------------+"  
446
447 all: cleantest depend asterisk subdirs 
448
449 #ifneq ($(wildcard tags),)
450 ctags: tags
451 #endif
452
453 ifneq ($(wildcard TAGS),)
454 all: TAGS
455 endif
456
457 noclean: depend asterisk subdirs
458
459 editline/config.h:
460         cd editline && unset CFLAGS LIBS && ./configure ; \
461
462 editline/libedit.a: FORCE
463         cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
464         $(MAKE) -C editline libedit.a
465
466 db1-ast/libdb1.a: FORCE
467         $(MAKE) -C db1-ast libdb1.a
468
469 ifneq ($(wildcard .depend),)
470   include .depend
471 endif
472
473 ifneq ($(wildcard .tags-depend),)
474   include .tags-depend
475 endif
476
477 ast_expr2.c:
478         bison -d --name-prefix=ast_yy ast_expr2.y -o ast_expr2.c
479
480 ast_expr2f.c:
481         flex --full ast_expr2.fl
482
483 testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
484         gcc -g -c -DSTANDALONE ast_expr2f.c
485         gcc -g -c -DSTANDALONE ast_expr2.c
486         gcc -g -o testexpr2 ast_expr2f.o ast_expr2.o
487         rm ast_expr2.o ast_expr2f.o 
488
489 manpage: asterisk.8
490
491 asterisk.8: asterisk.sgml
492         rm -f asterisk.8
493         docbook2man asterisk.sgml
494         mv ./*.8 asterisk.8
495
496 asterisk.pdf: asterisk.sgml
497         docbook2pdf asterisk.sgml
498
499 asterisk.ps: asterisk.sgml
500         docbook2ps asterisk.sgml
501
502 asterisk.html: asterisk.sgml
503         docbook2html asterisk.sgml
504         mv r1.html asterisk.html
505
506 asterisk.txt: asterisk.sgml
507         docbook2txt asterisk.sgml
508
509 defaults.h: FORCE
510         build_tools/make_defaults_h > $@.tmp
511         if cmp -s $@.tmp $@ ; then echo ; else \
512                 mv $@.tmp $@ ; \
513         fi
514         rm -f $@.tmp
515
516 include/asterisk/version.h: FORCE
517         build_tools/make_version_h > $@.tmp
518         if cmp -s $@.tmp $@ ; then echo; else \
519                 mv $@.tmp $@ ; \
520         fi
521         rm -f $@.tmp
522
523 stdtime/libtime.a: FORCE
524         $(MAKE) -C stdtime libtime.a
525
526 cygwin_a:
527         $(MAKE) -C cygwin all
528
529 asterisk: $(CYGLOADER) editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
530         build_tools/make_build_h > include/asterisk/build.h.tmp
531         if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
532                 mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
533         fi
534         rm -f include/asterisk/build.h.tmp
535         $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
536         $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
537
538 muted: muted.o
539         $(CC) $(AUDIO_LIBS) -o muted muted.o
540
541 subdirs: 
542         for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
543
544 clean-depend:
545         for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
546         rm -f .depend .tags-depend
547
548 clean: clean-depend
549         for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
550         rm -f *.o *.so asterisk
551         rm -f defaults.h
552         rm -f include/asterisk/build.h
553         rm -f include/asterisk/version.h
554         rm -f .tags-sources tags TAGS
555         @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
556         @if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
557         $(MAKE) -C db1-ast clean
558         $(MAKE) -C stdtime clean
559
560 datafiles: all
561         if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
562         # Should static HTTP be installed during make samples or even with its own target ala
563         # webvoicemail?  There are portions here that *could* be customized but might also be
564         # improved a lot.  I'll put it here for now.
565         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/static-http
566         for x in static-http/*; do \
567                 install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/static-http ; \
568         done
569         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
570         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
571         for x in sounds/digits/*.gsm; do \
572                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
573                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \
574                 else \
575                         echo "No description for $$x"; \
576                         exit 1; \
577                 fi; \
578         done
579         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate
580         for x in sounds/dictate/*.gsm; do \
581                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
582                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate ; \
583                 else \
584                         echo "No description for $$x"; \
585                         exit 1; \
586                 fi; \
587         done
588         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters
589         for x in sounds/letters/*.gsm; do \
590                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
591                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \
592                 else \
593                         echo "No description for $$x"; \
594                         exit 1; \
595                 fi; \
596         done
597         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic
598         for x in sounds/phonetic/*.gsm; do \
599                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
600                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \
601                 else \
602                         echo "No description for $$x"; \
603                         exit 1; \
604                 fi; \
605         done
606         for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-*; do \
607                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
608                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
609                 else \
610                         echo "No description for $$x"; \
611                         exit 1; \
612                 fi; \
613         done
614         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3
615         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/images
616         for x in images/*.jpg; do \
617                 $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \
618         done
619         mkdir -p $(DESTDIR)$(AGI_DIR)
620
621 update: 
622         @if [ -d .svn ]; then \
623                 echo "Updating from Subversion..." ; \
624                 svn update | tee update.out; \
625                 rm -f .version; \
626                 if [ `grep -c ^C update.out` -gt 0 ]; then \
627                         echo ; echo "The following files have conflicts:" ; \
628                         grep ^C update.out | cut -b4- ; \
629                 fi ; \
630                 rm -f update.out; \
631                 $(MAKE) clean-depend; \
632         elif [ -d CVS ]; then \
633                 echo "Updating from CVS..." ; \
634                 cvs -q -z3 update -Pd | tee update.out; \
635                 rm -f .version; \
636                 if [ `grep -c ^C update.out` -gt 0 ]; then \
637                         echo ; echo "The following files have conflicts:" ; \
638                         grep ^C update.out | cut -d' ' -f2- ; \
639                 fi ; \
640                 rm -f update.out; \
641                 $(MAKE) clean-depend; \
642         else \
643                 echo "Not under version control";  \
644         fi
645
646 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
647 OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
648
649 bininstall: all
650         mkdir -p $(DESTDIR)$(MODULES_DIR)
651         mkdir -p $(DESTDIR)$(ASTSBINDIR)
652         mkdir -p $(DESTDIR)$(ASTETCDIR)
653         mkdir -p $(DESTDIR)$(ASTBINDIR)
654         mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
655         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
656         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate
657         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
658         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
659         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
660         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
661         if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
662         if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
663         if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
664         ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
665         $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
666         $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/  
667         if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
668                 cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
669                 chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
670         fi
671         for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
672         $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
673         $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
674         if [ -n "$(OLDHEADERS)" ]; then \
675                 rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
676         fi
677         rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
678         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
679         mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
680         mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
681         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
682         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware
683         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax
684         mkdir -p $(DESTDIR)$(ASTMANDIR)/man8
685         $(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
686         $(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
687         $(INSTALL) -m 644 asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
688         $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8
689         $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8
690         $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
691         if [ -d contrib/firmware/iax ]; then \
692                 $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
693         else \
694                 echo "You need to do cvs update -d not just cvs update" ; \
695         fi 
696         ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/voicemail . )
697         if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
698         @echo " +---- Asterisk Installation Complete -------+"  
699         @echo " +                                           +"
700         @echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
701         @echo " +                                           +"
702         @echo " + Asterisk has successfully been installed. +"  
703         @echo " + If you would like to install the sample   +"  
704         @echo " + configuration files (overwriting any      +"
705         @echo " + existing config files), run:              +"  
706         @echo " +                                           +"
707         @echo " +               $(MAKE) samples                +"
708         @echo " +                                           +"
709         @echo " +-----------------  or ---------------------+"
710         @echo " +                                           +"
711         @echo " + You can go ahead and install the asterisk +"
712         @echo " + program documentation now or later run:   +"
713         @echo " +                                           +"
714         @echo " +              $(MAKE) progdocs                +"
715         @echo " +                                           +"
716         @echo " + **Note** This requires that you have      +"
717         @echo " + doxygen installed on your local system    +"
718         @echo " +-------------------------------------------+"
719         @$(MAKE) -s oldmodcheck
720
721 NEWMODS=$(notdir $(wildcard */*.so))
722 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
723
724 oldmodcheck:
725         @if [ -n "$(OLDMODS)" ]; then \
726                 echo " WARNING WARNING WARNING" ;\
727                 echo "" ;\
728                 echo " Your Asterisk modules directory, located at" ;\
729                 echo " $(DESTDIR)$(MODULES_DIR)" ;\
730                 echo " contains modules that were not installed by this " ;\
731                 echo " version of Asterisk. Please ensure that these" ;\
732                 echo " modules are compatible with this version before" ;\
733                 echo " attempting to run Asterisk." ;\
734                 echo "" ;\
735                 for f in $(OLDMODS); do \
736                         echo "    $$f" ;\
737                 done ;\
738                 echo "" ;\
739                 echo " WARNING WARNING WARNING" ;\
740         fi
741
742 install: all datafiles bininstall
743         @if [ -x /usr/sbin/asterisk-post-install ]; then \
744                 /usr/sbin/asterisk-post-install $(DESTDIR) . ; \
745         fi
746
747 upgrade: all bininstall
748
749 adsi:
750         mkdir -p $(DESTDIR)$(ASTETCDIR)
751         for x in configs/*.adsi; do \
752                 if [ ! -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
753                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
754                 fi ; \
755         done
756
757 samples: adsi
758         mkdir -p $(DESTDIR)$(ASTETCDIR)
759         for x in configs/*.sample; do \
760                 if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
761                         if [ "$(OVERWRITE)" = "y" ]; then \
762                                 if cmp -s $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $$x ; then \
763                                         echo "Config file $$x is unchanged"; \
764                                         continue; \
765                                 fi ; \
766                                 mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
767                         else \
768                                 echo "Skipping config file $$x"; \
769                                 continue; \
770                         fi ;\
771                 fi ; \
772                 $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
773         done
774         if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
775                 ( \
776                 echo "[directories]" ; \
777                 echo "astetcdir => $(ASTETCDIR)" ; \
778                 echo "astmoddir => $(MODULES_DIR)" ; \
779                 echo "astvarlibdir => $(ASTVARLIBDIR)" ; \
780                 echo "astagidir => $(AGI_DIR)" ; \
781                 echo "astspooldir => $(ASTSPOOLDIR)" ; \
782                 echo "astrundir => $(ASTVARRUNDIR)" ; \
783                 echo "astlogdir => $(ASTLOGDIR)" ; \
784                 echo "" ; \
785                 echo "; Changing the following lines may compromise your security." ; \
786                 echo ";[files]" ; \
787                 echo ";astctlpermissions = 0660" ; \
788                 echo ";astctlowner = root" ; \
789                 echo ";astctlgroup = apache" ; \
790                 echo ";astctl = asterisk.ctl" ; \
791                 echo ";[options]" ; \
792                 echo ";internal_timing = yes" ; \
793                 ) > $(DESTDIR)$(ASTCONFPATH) ; \
794         else \
795                 echo "Skipping asterisk.conf creation"; \
796         fi
797         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
798         for x in sounds/demo-*; do \
799                 if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
800                         $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
801                 else \
802                         echo "No description for $$x"; \
803                         exit 1; \
804                 fi; \
805         done
806         mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
807         for x in sounds/*.mp3; do \
808                 $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
809         done
810         rm -f $(DESTDIR)$(ASTVARLIBDIR)/mohmp3/sample-hold.mp3
811         mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
812         :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
813         for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
814                 cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
815         done
816         :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
817         for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
818                 cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
819         done
820
821 webvmail:
822         @[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
823         @[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
824         $(INSTALL) -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
825         mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
826         for x in images/*.gif; do \
827                 $(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
828         done
829         @echo " +--------- Asterisk Web Voicemail ----------+"  
830         @echo " +                                           +"
831         @echo " + Asterisk Web Voicemail is installed in    +"
832         @echo " + your cgi-bin directory:                   +"
833         @echo " + $(DESTDIR)$(HTTP_CGIDIR)"
834         @echo " + IT USES A SETUID ROOT PERL SCRIPT, SO     +"
835         @echo " + IF YOU DON'T LIKE THAT, UNINSTALL IT!     +"
836         @echo " +                                           +"
837         @echo " + Other static items have been stored in:   +"
838         @echo " + $(DESTDIR)$(HTTP_DOCSDIR)"
839         @echo " +                                           +"
840         @echo " + If these paths do not match your httpd    +"
841         @echo " + installation, correct the definitions     +"
842         @echo " + in your Makefile of HTTP_CGIDIR and       +"
843         @echo " + HTTP_DOCSDIR                              +"
844         @echo " +                                           +"
845         @echo " +-------------------------------------------+"  
846
847 spec: 
848         sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
849
850 rpm: __rpm
851
852 __rpm: include/asterisk/version.h spec
853         rm -rf /tmp/asterisk ; \
854         mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
855         $(MAKE) DESTDIR=/tmp/asterisk install ; \
856         $(MAKE) DESTDIR=/tmp/asterisk samples ; \
857         mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
858         cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
859         rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
860
861 progdocs:
862         (cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
863         echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen - 
864
865 mpg123:
866         @wget -V >/dev/null || (echo "You need wget" ; false )
867         [ -f mpg123-0.59r.tar.gz ] || wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
868         [ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
869         $(MAKE) -C mpg123-0.59r $(MPG123TARG)
870
871 config:
872         if [ -d /etc/rc.d/init.d ]; then \
873                 $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
874                 /sbin/chkconfig --add asterisk; \
875         elif [ -d /etc/init.d ]; then \
876                 $(INSTALL) -m 755 init.asterisk /etc/init.d/asterisk; \
877         fi 
878
879 dont-optimize: install
880
881 valgrind: dont-optimize
882
883 depend: include/asterisk/version.h .depend defaults.h 
884         for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
885
886 .depend: include/asterisk/version.h
887         build_tools/mkdep $(CFLAGS) $(wildcard *.c)
888
889 .tags-depend:
890         @echo -n ".tags-depend: " > $@
891         @find . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
892         @find . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
893         @find $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
894         @find $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
895         @find include -name \*.h -printf "\t%p \\\\\n" >> $@
896         @echo >> $@
897
898 .tags-sources:
899         @rm -f $@
900         @find . -maxdepth 1 -name \*.c -print >> $@
901         @find . -maxdepth 1 -name \*.h -print >> $@
902         @find $(SUBDIRS) -name \*.c -print >> $@
903         @find $(SUBDIRS) -name \*.h -print >> $@
904         @find include -name \*.h -print >> $@
905
906 tags: .tags-depend .tags-sources
907         ctags -L .tags-sources -o $@
908
909 ctags: tags
910
911 TAGS: .tags-depend .tags-sources
912         etags -o $@ `cat .tags-sources`
913
914 etags: TAGS
915
916 FORCE:
917
918 %_env:
919         $(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
920
921 env:
922         env
923
924 # If the cleancount has been changed, force a make clean.
925 # .cleancount is the global clean count, and .lastclean is the 
926 # last clean count we had
927 # We can avoid this by making noclean
928
929 cleantest:
930         if cmp -s .cleancount .lastclean ; then echo ; else \
931                 $(MAKE) clean; cp -f .cleancount .lastclean;\
932         fi
933
934 _uninstall:
935         rm -f $(DESTDIR)$(MODULES_DIR)/*
936         rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
937         rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
938         rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
939         rm -rf $(DESTDIR)$(ASTHEADERDIR)
940         rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds
941         rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware
942         rm -rf $(DESTDIR)$(ASTMANDIR)/man8
943         for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
944
945 uninstall: _uninstall
946         @echo " +--------- Asterisk Uninstall Complete -----+"  
947         @echo " + Asterisk binaries, sounds, man pages,     +"  
948         @echo " + headers, modules, and firmware builds,    +"  
949         @echo " + have all been uninstalled.                +"  
950         @echo " +                                           +"
951         @echo " + To remove ALL traces of Asterisk,         +"
952         @echo " + including configuration, spool            +"
953         @echo " + directories, and logs, run the following  +"
954         @echo " + command:                                  +"
955         @echo " +                                           +"
956         @echo " +            $(MAKE) uninstall-all             +"  
957         @echo " +-------------------------------------------+"  
958
959 uninstall-all: _uninstall
960         rm -rf $(DESTDIR)$(ASTLIBDIR)
961         rm -rf $(DESTDIR)$(ASTVARLIBDIR)
962         rm -rf $(DESTDIR)$(ASTSPOOLDIR)
963         rm -rf $(DESTDIR)$(ASTETCDIR)
964         rm -rf $(DESTDIR)$(ASTLOGDIR)