1999-12-05 07:16:40 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Top level Makefile
|
|
|
|
#
|
2006-02-06 20:30:49 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
1999-12-05 07:16:40 +00:00
|
|
|
#
|
2005-06-06 18:29:57 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
1999-12-05 07:16:40 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
|
2003-08-05 01:25:43 +00:00
|
|
|
# Create OPTIONS variable
|
|
|
|
OPTIONS=
|
2006-04-06 17:13:00 +00:00
|
|
|
|
2005-03-27 22:39:17 +00:00
|
|
|
# If cross compiling, define these to suit
|
2006-04-06 17:13:00 +00:00
|
|
|
#CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-
|
|
|
|
#CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/
|
|
|
|
#CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target
|
|
|
|
#CROSS_ARCH=Linux
|
|
|
|
#CROSS_PROC=arm
|
|
|
|
#SUB_PROC=xscale # or maverick
|
|
|
|
|
|
|
|
# Pentium Pro Optimize
|
|
|
|
#PROC=i686
|
|
|
|
|
|
|
|
# Pentium & VIA processors optimize
|
|
|
|
#PROC=i586
|
|
|
|
|
|
|
|
#PROC=k6
|
|
|
|
#PROC=ppc
|
|
|
|
|
2005-03-30 06:31:42 +00:00
|
|
|
CC=$(CROSS_COMPILE)gcc
|
2005-05-19 04:08:01 +00:00
|
|
|
HOST_CC=gcc
|
2005-03-27 22:39:17 +00:00
|
|
|
|
2005-08-07 14:59:41 +00:00
|
|
|
ifeq ($(CROSS_COMPILE),)
|
2005-08-30 02:54:02 +00:00
|
|
|
OSARCH=$(shell uname -s)
|
2006-04-06 17:13:00 +00:00
|
|
|
PROC?=$(shell uname -m)
|
2005-08-07 14:59:41 +00:00
|
|
|
else
|
2005-08-30 02:54:02 +00:00
|
|
|
OSARCH=$(CROSS_ARCH)
|
2006-04-06 17:13:00 +00:00
|
|
|
PROC=$(CROSS_PROC)
|
2005-08-07 14:59:41 +00:00
|
|
|
endif
|
|
|
|
|
2006-02-23 22:38:47 +00:00
|
|
|
PWD=$(shell pwd)
|
|
|
|
|
2005-09-08 00:34:19 +00:00
|
|
|
# Remember the MAKELEVEL at the top
|
|
|
|
MAKETOPLEVEL?=$(MAKELEVEL)
|
|
|
|
|
2005-11-07 22:33:12 +00:00
|
|
|
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
|
2006-04-06 17:13:00 +00:00
|
|
|
# More GSM codec optimization
|
|
|
|
# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
|
|
|
|
# which support MMX instructions. This should be newer pentiums,
|
|
|
|
# ppro's, etc, as well as the AMD K6 and K7.
|
2003-04-28 23:04:57 +00:00
|
|
|
#K6OPT = -DK6OPT
|
2003-03-18 06:00:18 +00:00
|
|
|
|
2006-04-06 17:13:00 +00:00
|
|
|
# Tell gcc to optimize the code
|
2004-08-31 16:33:00 +00:00
|
|
|
OPTIMIZE+=-O6
|
2005-12-27 06:24:28 +00:00
|
|
|
else
|
|
|
|
# Stack backtraces, while useful for debugging, are incompatible with optimizations
|
|
|
|
ifeq (${OSARCH},Linux)
|
|
|
|
CFLAGS+=-DSTACK_BACKTRACES
|
|
|
|
endif
|
2005-11-07 22:33:12 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-06 17:13:00 +00:00
|
|
|
# Overwite config files on "make samples"
|
2005-11-07 22:33:12 +00:00
|
|
|
OVERWRITE=y
|
2003-03-18 06:00:18 +00:00
|
|
|
|
2006-04-06 17:13:00 +00:00
|
|
|
# Include debug and macro symbols in the executables (-g) and profiling info (-pg)
|
2005-11-16 04:11:48 +00:00
|
|
|
DEBUG=-g3 #-pg
|
2003-03-18 06:00:18 +00:00
|
|
|
|
2006-04-06 17:13:00 +00:00
|
|
|
# Set NOCRYPTO to yes if you do not want to have crypto support or dependencies
|
2005-10-16 03:08:58 +00:00
|
|
|
#NOCRYPTO=yes
|
|
|
|
|
2004-05-31 16:04:10 +00:00
|
|
|
# If you are running a radio application, define RADIO_RELAX so that the DTMF
|
|
|
|
# will be received more reliably
|
|
|
|
#OPTIONS += -DRADIO_RELAX
|
|
|
|
|
2005-03-27 22:39:17 +00:00
|
|
|
# If you don't have a lot of memory (e.g. embedded Asterisk), define LOW_MEMORY
|
|
|
|
# to reduce the size of certain static buffers
|
2005-03-27 22:39:51 +00:00
|
|
|
#ifneq ($(CROSS_COMPILE),)
|
|
|
|
#OPTIONS += -DLOW_MEMORY
|
|
|
|
#endif
|
2004-06-12 14:34:15 +00:00
|
|
|
|
2006-02-10 21:50:56 +00:00
|
|
|
# Asterisk SMDI integration
|
|
|
|
WITH_SMDI = 1
|
|
|
|
|
2003-03-18 06:00:18 +00:00
|
|
|
# Optional debugging parameters
|
2005-07-15 22:21:31 +00:00
|
|
|
DEBUG_THREADS = #-DDUMP_SCHEDULER #-DDEBUG_SCHEDULER #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
|
2003-03-18 06:00:18 +00:00
|
|
|
|
|
|
|
# Uncomment next one to enable ast_frame tracing (for debugging)
|
|
|
|
TRACE_FRAMES = #-DTRACE_FRAMES
|
|
|
|
|
2003-04-28 19:58:43 +00:00
|
|
|
# Uncomment next one to enable malloc debugging
|
|
|
|
# You can view malloc debugging with:
|
|
|
|
# *CLI> show memory allocations [filename]
|
|
|
|
# *CLI> show memory summary [filename]
|
|
|
|
#
|
2003-05-06 14:49:34 +00:00
|
|
|
MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
|
2003-04-28 19:58:43 +00:00
|
|
|
|
2003-03-18 06:00:18 +00:00
|
|
|
# Where to install asterisk after compiling
|
|
|
|
# Default -> leave empty
|
2005-09-29 04:06:15 +00:00
|
|
|
INSTALL_PREFIX?=
|
2001-09-24 21:29:03 +00:00
|
|
|
|
2003-10-25 17:27:53 +00:00
|
|
|
# Staging directory
|
|
|
|
# Files are copied here temporarily during the install process
|
|
|
|
# For example, make DESTDIR=/tmp/asterisk woud put things in
|
|
|
|
# /tmp/asterisk/etc/asterisk
|
2006-04-06 17:13:00 +00:00
|
|
|
# !!! Watch out, put no spaces or comments after the value !!!
|
2005-11-08 00:08:09 +00:00
|
|
|
DESTDIR?=
|
|
|
|
#DESTDIR?=/tmp/asterisk
|
2003-10-25 17:27:53 +00:00
|
|
|
|
2003-06-17 21:53:18 +00:00
|
|
|
# Original busydetect routine
|
2003-08-14 15:58:22 +00:00
|
|
|
BUSYDETECT = #-DBUSYDETECT
|
2003-06-17 21:53:18 +00:00
|
|
|
|
2003-06-17 22:30:25 +00:00
|
|
|
# Improved busydetect routine, comment the previous one if you use this one
|
2005-07-25 21:57:14 +00:00
|
|
|
BUSYDETECT+= #-DBUSYDETECT_MARTIN
|
2003-06-17 21:53:18 +00:00
|
|
|
# Detect the busy signal looking only at tone lengths
|
|
|
|
# For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
|
|
|
|
BUSYDETECT+= #-DBUSYDETECT_TONEONLY
|
2006-01-23 12:32:43 +00:00
|
|
|
# Enforce the detection of busy signal (get rid of false hangups)
|
2003-06-17 21:53:18 +00:00
|
|
|
# Don't use together with -DBUSYDETECT_TONEONLY
|
|
|
|
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
|
|
|
|
|
2006-04-07 07:04:05 +00:00
|
|
|
# Define standard directories for various platforms
|
|
|
|
# These apply if they are not redefined in asterisk.conf
|
|
|
|
ifeq ($(OSARCH),SunOS)
|
|
|
|
ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
|
2005-08-30 02:54:02 +00:00
|
|
|
ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
|
|
|
|
ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
|
|
|
|
ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
|
|
|
|
ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
|
|
|
|
ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
|
|
|
|
ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
|
|
|
|
ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
|
|
|
|
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
|
|
|
|
ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
|
2006-04-07 07:04:05 +00:00
|
|
|
else
|
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
|
|
|
PREFIX?=/usr/local
|
|
|
|
ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
|
|
|
|
ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
|
|
|
|
ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
|
|
|
|
ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
|
|
|
|
ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
|
|
|
|
ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
|
|
|
|
ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
|
|
|
|
ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
|
|
|
|
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
|
|
|
|
ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
|
|
|
|
else
|
|
|
|
ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
|
|
|
|
ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
|
|
|
|
ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
|
|
|
|
ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
|
|
|
|
ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
|
|
|
|
ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
|
|
|
|
ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
|
|
|
|
ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
|
|
|
|
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
|
|
|
|
ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
|
2005-08-07 14:59:41 +00:00
|
|
|
endif
|
2006-04-07 07:04:05 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
|
|
|
|
# when starting Asterisk
|
|
|
|
ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
|
|
|
|
MODULES_DIR=$(ASTLIBDIR)/modules
|
|
|
|
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
|
|
|
|
|
|
|
|
# If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
|
|
|
|
HTTP_DOCSDIR=/var/www/html
|
|
|
|
# Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
|
|
|
|
HTTP_CGIDIR=/var/www/cgi-bin
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS=
|
|
|
|
|
2006-02-20 23:35:12 +00:00
|
|
|
# Define this to use files larger than 2GB (useful for sound files longer than 37 hours and logfiles)
|
|
|
|
ASTCFLAGS+=-D_FILE_OFFSET_BITS=64
|
|
|
|
|
2006-04-06 17:13:00 +00:00
|
|
|
# Uncomment this to use the older DSP routines
|
2005-09-08 00:34:19 +00:00
|
|
|
#ASTCFLAGS+=-DOLD_DSP_ROUTINES
|
2005-07-14 19:40:15 +00:00
|
|
|
|
|
|
|
# If the file .asterisk.makeopts is present in your home directory, you can
|
|
|
|
# include all of your favorite Makefile options so that every time you download
|
|
|
|
# a new version of Asterisk, you don't have to edit the makefile to set them.
|
2005-07-18 18:34:52 +00:00
|
|
|
# The file, /etc/asterisk.makeopts will also be included, but can be overridden
|
|
|
|
# by the file in your home directory.
|
|
|
|
|
|
|
|
ifneq ($(wildcard /etc/asterisk.makeopts),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include /etc/asterisk.makeopts
|
2005-07-18 18:34:52 +00:00
|
|
|
endif
|
2005-07-14 19:40:15 +00:00
|
|
|
|
|
|
|
ifneq ($(wildcard ~/.asterisk.makeopts),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include ~/.asterisk.makeopts
|
2005-07-14 19:40:15 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),Linux)
|
2005-08-30 02:54:02 +00:00
|
|
|
ifeq ($(PROC),x86_64)
|
|
|
|
# You must have GCC 3.4 to use k8, otherwise use athlon
|
|
|
|
PROC=k8
|
|
|
|
#PROC=athlon
|
|
|
|
OPTIONS+=-m64
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PROC),sparc64)
|
|
|
|
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
|
|
|
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
|
|
|
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
|
|
|
|
#So we go lowest common available by gcc and go a step down, still a step up from
|
|
|
|
#the default as we now have a better instruction set to work with. - Belgarath
|
|
|
|
PROC=ultrasparc
|
|
|
|
OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
|
|
|
|
OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
|
|
|
|
OPTIONS+=-fomit-frame-pointer
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PROC),arm)
|
|
|
|
# The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
|
|
|
|
ifeq ($(SUB_PROC),maverick)
|
|
|
|
OPTIONS+=-fsigned-char -mcpu=ep9312
|
|
|
|
else
|
|
|
|
ifeq ($(SUB_PROC),xscale)
|
|
|
|
OPTIONS+=-fsigned-char -msoft-float -mcpu=xscale
|
|
|
|
else
|
|
|
|
OPTIONS+=-fsigned-char -msoft-float
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
MPG123TARG=linux
|
2005-07-14 19:40:15 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
GREP=grep
|
2006-03-03 17:15:51 +00:00
|
|
|
ID=id
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),SunOS)
|
2005-08-30 02:54:02 +00:00
|
|
|
GREP=/usr/xpg4/bin/grep
|
|
|
|
M4=/usr/local/bin/m4
|
2006-03-03 17:15:51 +00:00
|
|
|
ID=/usr/xpg4/bin/id
|
2005-07-14 19:40:15 +00:00
|
|
|
endif
|
|
|
|
|
2005-09-29 04:06:15 +00:00
|
|
|
INCLUDE+=-Iinclude -I../include
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
|
|
|
|
ASTCFLAGS+=$(OPTIMIZE)
|
2006-02-23 04:38:38 +00:00
|
|
|
ASTCFLAGS+=# -Werror -Wunused
|
2006-02-22 22:53:49 +00:00
|
|
|
ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
|
|
|
|
ASTCFLAGS+= -Wno-pointer-sign
|
|
|
|
endif
|
2005-11-01 21:53:30 +00:00
|
|
|
ASTOBJ=-o asterisk
|
2004-08-31 03:31:59 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(findstring BSD,$(OSARCH)),BSD)
|
2005-09-26 02:08:06 +00:00
|
|
|
ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
|
|
|
endif
|
|
|
|
|
2004-08-31 03:31:59 +00:00
|
|
|
ifneq ($(PROC),ultrasparc)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
2004-08-31 03:31:59 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-03-27 22:39:17 +00:00
|
|
|
ifeq ($(PROC),ppc)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-fsigned-char
|
2005-03-27 22:39:17 +00:00
|
|
|
endif
|
2004-08-31 03:31:59 +00:00
|
|
|
|
2005-09-25 20:50:40 +00:00
|
|
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),)
|
|
|
|
ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/local/include/osp
|
|
|
|
else
|
|
|
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
|
|
|
|
ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/include/osp
|
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
2004-06-22 17:42:14 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
|
2005-11-05 18:58:27 +00:00
|
|
|
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
|
|
|
LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
|
2005-08-30 02:54:02 +00:00
|
|
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
|
2005-09-14 01:10:20 +00:00
|
|
|
ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
MPG123TARG=freebsd
|
2004-06-22 17:42:14 +00:00
|
|
|
endif # FreeBSD
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),NetBSD)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-pthread
|
2005-08-30 02:54:02 +00:00
|
|
|
INCLUDE+=-I$(CROSS_COMPILE_TARGET)/usr/pkg/include
|
|
|
|
MPG123TARG=netbsd
|
2004-08-31 13:32:11 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-pthread
|
2003-04-27 18:13:11 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),SunOS)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-Wcast-align -DSOLARIS
|
2005-08-30 02:54:02 +00:00
|
|
|
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
|
2004-12-14 23:36:30 +00:00
|
|
|
endif
|
2002-06-21 01:40:13 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(findstring CYGWIN,$(OSARCH)),CYGWIN)
|
2005-11-08 03:31:45 +00:00
|
|
|
CYGLOADER=cygwin_a
|
|
|
|
OSARCH=CYGWIN
|
|
|
|
ASTOBJ=-shared -o asterisk.dll -Wl,--out-implib=libasterisk.dll.a -Wl,--export-all-symbols
|
|
|
|
ASTLINK=
|
|
|
|
LIBS+=-lpthread -lncurses -lm -lresolv
|
|
|
|
ASTSBINDIR=$(MODULES_DIR)
|
2005-11-01 21:53:30 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-08 00:12:21 +00:00
|
|
|
ifndef WITHOUT_ZAPTEL
|
|
|
|
|
2005-09-14 01:10:20 +00:00
|
|
|
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),)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
2003-05-12 04:23:55 +00:00
|
|
|
|
2005-11-08 00:12:21 +00:00
|
|
|
endif # WITHOUT_ZAPTEL
|
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
LIBEDIT=editline/libedit.a
|
|
|
|
|
2005-08-30 02:54:02 +00:00
|
|
|
ifneq ($(wildcard .version),)
|
2005-11-28 03:59:39 +00:00
|
|
|
ASTERISKVERSION:=$(shell cat .version)
|
|
|
|
ASTERISKVERSIONNUM:=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
|
|
|
|
RPMVERSION:=$(shell sed 's/[-\/:]/_/g' .version)
|
2005-08-30 02:54:02 +00:00
|
|
|
else
|
|
|
|
RPMVERSION=unknown
|
|
|
|
endif
|
2005-07-12 02:08:03 +00:00
|
|
|
|
2005-11-28 03:59:39 +00:00
|
|
|
# CVS mirrors of SVN have .svnrevision files showing
|
|
|
|
# which SVN revision they are based on, and .svnbranch
|
|
|
|
# showing the branch they are made from
|
|
|
|
ifneq ($(wildcard .svnrevision),)
|
2005-08-30 02:54:02 +00:00
|
|
|
ASTERISKVERSIONNUM=999999
|
2005-11-28 03:59:39 +00:00
|
|
|
ASTERISKVERSION:=SVN-$(shell cat .svnbranch)-r$(shell cat .svnrevision)
|
|
|
|
else
|
|
|
|
ifneq ($(wildcard .svn),)
|
|
|
|
ASTERISKVERSIONNUM=999999
|
|
|
|
ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
endif
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+= $(DEBUG_THREADS)
|
|
|
|
ASTCFLAGS+= $(TRACE_FRAMES)
|
|
|
|
ASTCFLAGS+= $(MALLOC_DEBUG)
|
|
|
|
ASTCFLAGS+= $(BUSYDETECT)
|
|
|
|
ASTCFLAGS+= $(OPTIONS)
|
2005-12-27 06:24:28 +00:00
|
|
|
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+= -fomit-frame-pointer
|
2005-12-27 06:24:28 +00:00
|
|
|
endif
|
|
|
|
|
2005-05-05 05:39:33 +00:00
|
|
|
SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-08-31 03:32:15 +00:00
|
|
|
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
|
2006-03-23 14:28:16 +00:00
|
|
|
translate.o file.o pbx.o cli.o md5.o term.o \
|
2005-08-31 03:32:15 +00:00
|
|
|
ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
|
2006-01-12 17:12:12 +00:00
|
|
|
cdr.o tdd.o acl.o rtp.o udptl.o manager.o asterisk.o \
|
2005-08-31 03:32:15 +00:00
|
|
|
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
|
|
|
|
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
|
|
|
|
utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
|
2005-10-16 03:08:58 +00:00
|
|
|
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
|
2006-03-25 23:50:09 +00:00
|
|
|
cryptostub.o sha1.o http.o
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-03-23 14:28:16 +00:00
|
|
|
# we need to link in the objects statically, not as a library, because
|
|
|
|
# otherwise modules will not have them available if none of the static
|
|
|
|
# objects use it.
|
|
|
|
OBJS+= stdtime/localtime.o
|
|
|
|
|
|
|
|
# At the moment say.o is an optional component which can be overridden
|
|
|
|
# by a module.
|
|
|
|
OBJS+= say.o
|
|
|
|
|
2005-09-26 17:17:56 +00:00
|
|
|
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
|
|
|
|
OBJS+= poll.o
|
|
|
|
ASTCFLAGS+=-DPOLLCOMPAT
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
|
2005-10-08 17:08:44 +00:00
|
|
|
OBJS+= dlfcn.o
|
2005-09-26 17:17:56 +00:00
|
|
|
ASTCFLAGS+=-DDLFCNCOMPAT
|
|
|
|
endif
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),Linux)
|
2005-09-29 04:06:15 +00:00
|
|
|
LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
|
2005-08-31 03:32:15 +00:00
|
|
|
else
|
|
|
|
LIBS+=-lncurses -lm
|
2003-10-21 02:57:29 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),Darwin)
|
2005-08-30 02:54:02 +00:00
|
|
|
LIBS+=-lresolv
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=-D__Darwin__
|
2005-08-30 02:54:02 +00:00
|
|
|
AUDIO_LIBS=-framework CoreAudio
|
2005-08-31 03:32:15 +00:00
|
|
|
ASTLINK=-Wl,-dynamic
|
|
|
|
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
2006-04-05 20:14:51 +00:00
|
|
|
# Mac on Intel CoreDuo does not need poll compatibility layer
|
2006-04-06 17:13:00 +00:00
|
|
|
ifneq ($(PROC),i386)
|
2006-04-05 20:14:51 +00:00
|
|
|
OBJS+=poll.o
|
|
|
|
ASTCFLAGS+=-DPOLLCOMPAT
|
|
|
|
endif
|
2005-08-31 03:32:15 +00:00
|
|
|
else
|
2006-04-06 17:13:00 +00:00
|
|
|
# These are used for all but Darwin
|
2005-08-31 03:32:15 +00:00
|
|
|
ASTLINK=-Wl,-E
|
|
|
|
SOLINK=-shared -Xlinker -x
|
2006-01-27 05:33:20 +00:00
|
|
|
ifeq ($(findstring BSD,$(OSARCH)),BSD)
|
|
|
|
SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
|
|
|
endif
|
2003-10-27 20:00:41 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
LIBS+=-lcrypto
|
2004-06-25 22:56:28 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),NetBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib -lncurses
|
2004-08-31 13:32:11 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
2005-09-29 04:06:15 +00:00
|
|
|
LIBS+=-lcrypto -lpthread -lm -lncurses
|
2004-08-01 18:48:37 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),SunOS)
|
2005-08-30 02:54:02 +00:00
|
|
|
LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
|
|
|
|
OBJS+=strcompat.o
|
|
|
|
ASTLINK=
|
|
|
|
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
|
2004-12-14 23:36:30 +00:00
|
|
|
endif
|
2003-10-26 18:50:49 +00:00
|
|
|
|
2005-09-08 00:34:19 +00:00
|
|
|
ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
|
|
|
|
CFLAGS+=$(ASTCFLAGS)
|
|
|
|
endif
|
|
|
|
|
2005-11-14 19:00:38 +00:00
|
|
|
# This is used when generating the doxygen documentation
|
|
|
|
ifneq ($(wildcard /usr/local/bin/dot)$(wildcard /usr/bin/dot),)
|
|
|
|
HAVEDOT=yes
|
|
|
|
else
|
|
|
|
HAVEDOT=no
|
|
|
|
endif
|
|
|
|
|
1999-12-05 07:16:40 +00:00
|
|
|
INSTALL=install
|
|
|
|
|
2006-01-12 17:12:12 +00:00
|
|
|
CFLAGS+=-DT38_SUPPORT
|
|
|
|
|
2000-01-05 20:03:55 +00:00
|
|
|
_all: all
|
|
|
|
@echo " +--------- Asterisk Build Complete ---------+"
|
|
|
|
@echo " + Asterisk has successfully been built, but +"
|
|
|
|
@echo " + cannot be run before being installed by +"
|
|
|
|
@echo " + running: +"
|
|
|
|
@echo " + +"
|
2003-04-23 16:23:12 +00:00
|
|
|
@echo " + $(MAKE) install +"
|
2000-01-05 20:03:55 +00:00
|
|
|
@echo " +-------------------------------------------+"
|
|
|
|
|
2005-01-17 04:48:51 +00:00
|
|
|
all: cleantest depend asterisk subdirs
|
|
|
|
|
2005-05-26 20:24:56 +00:00
|
|
|
#ifneq ($(wildcard tags),)
|
|
|
|
ctags: tags
|
|
|
|
#endif
|
2005-04-01 21:18:39 +00:00
|
|
|
|
|
|
|
ifneq ($(wildcard TAGS),)
|
|
|
|
all: TAGS
|
|
|
|
endif
|
|
|
|
|
2005-01-17 04:48:51 +00:00
|
|
|
noclean: depend asterisk subdirs
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
editline/config.h:
|
2003-09-13 20:51:48 +00:00
|
|
|
cd editline && unset CFLAGS LIBS && ./configure ; \
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2003-09-27 15:52:17 +00:00
|
|
|
editline/libedit.a: FORCE
|
|
|
|
cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C editline libedit.a
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2003-09-27 15:52:17 +00:00
|
|
|
db1-ast/libdb1.a: FORCE
|
2006-02-12 16:52:42 +00:00
|
|
|
$(MAKE) -C db1-ast libdb1.a
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2003-08-19 16:42:30 +00:00
|
|
|
ifneq ($(wildcard .depend),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2005-04-01 21:18:39 +00:00
|
|
|
ifneq ($(wildcard .tags-depend),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include .tags-depend
|
2005-04-01 21:18:39 +00:00
|
|
|
endif
|
|
|
|
|
2005-08-26 19:55:11 +00:00
|
|
|
ast_expr2.c:
|
2005-08-26 19:21:57 +00:00
|
|
|
bison -d --name-prefix=ast_yy ast_expr2.y -o ast_expr2.c
|
2005-05-19 04:08:01 +00:00
|
|
|
|
2005-08-26 19:55:11 +00:00
|
|
|
ast_expr2f.c:
|
2005-08-30 14:44:00 +00:00
|
|
|
flex --full ast_expr2.fl
|
2002-09-02 15:20:28 +00:00
|
|
|
|
2005-08-26 19:21:57 +00:00
|
|
|
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
|
2005-05-16 00:35:38 +00:00
|
|
|
gcc -g -c -DSTANDALONE ast_expr2f.c
|
|
|
|
gcc -g -c -DSTANDALONE ast_expr2.c
|
|
|
|
gcc -g -o testexpr2 ast_expr2f.o ast_expr2.o
|
2005-09-19 12:41:32 +00:00
|
|
|
rm ast_expr2.o ast_expr2f.o
|
2005-05-16 00:35:38 +00:00
|
|
|
|
2005-09-15 00:12:36 +00:00
|
|
|
manpage: asterisk.8
|
2004-07-18 17:58:05 +00:00
|
|
|
|
2005-09-15 00:12:36 +00:00
|
|
|
asterisk.8: asterisk.sgml
|
2004-07-18 17:58:05 +00:00
|
|
|
rm -f asterisk.8
|
|
|
|
docbook2man asterisk.sgml
|
|
|
|
mv ./*.8 asterisk.8
|
|
|
|
|
2005-04-29 15:18:10 +00:00
|
|
|
asterisk.pdf: asterisk.sgml
|
|
|
|
docbook2pdf asterisk.sgml
|
|
|
|
|
|
|
|
asterisk.ps: asterisk.sgml
|
|
|
|
docbook2ps asterisk.sgml
|
|
|
|
|
|
|
|
asterisk.html: asterisk.sgml
|
|
|
|
docbook2html asterisk.sgml
|
|
|
|
mv r1.html asterisk.html
|
|
|
|
|
|
|
|
asterisk.txt: asterisk.sgml
|
|
|
|
docbook2txt asterisk.sgml
|
|
|
|
|
2005-06-06 03:04:58 +00:00
|
|
|
defaults.h: FORCE
|
2005-06-20 17:26:08 +00:00
|
|
|
build_tools/make_defaults_h > $@.tmp
|
2005-06-21 22:16:30 +00:00
|
|
|
if cmp -s $@.tmp $@ ; then echo ; else \
|
2005-06-06 03:04:58 +00:00
|
|
|
mv $@.tmp $@ ; \
|
|
|
|
fi
|
|
|
|
rm -f $@.tmp
|
|
|
|
|
|
|
|
include/asterisk/version.h: FORCE
|
2005-06-20 17:26:08 +00:00
|
|
|
build_tools/make_version_h > $@.tmp
|
2005-06-21 22:16:30 +00:00
|
|
|
if cmp -s $@.tmp $@ ; then echo; else \
|
2005-06-06 03:04:58 +00:00
|
|
|
mv $@.tmp $@ ; \
|
|
|
|
fi
|
|
|
|
rm -f $@.tmp
|
2001-05-09 03:11:22 +00:00
|
|
|
|
2003-09-27 15:52:17 +00:00
|
|
|
stdtime/libtime.a: FORCE
|
2006-02-12 16:52:42 +00:00
|
|
|
$(MAKE) -C stdtime libtime.a
|
2003-09-13 20:51:48 +00:00
|
|
|
|
2005-11-01 21:53:30 +00:00
|
|
|
cygwin_a:
|
|
|
|
$(MAKE) -C cygwin all
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
asterisk: $(CYGLOADER) editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
|
|
|
|
build_tools/make_build_h > include/asterisk/build.h.tmp
|
|
|
|
if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
|
|
|
|
mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
|
|
|
|
fi
|
|
|
|
rm -f include/asterisk/build.h.tmp
|
|
|
|
$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
|
|
|
|
$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2004-05-17 06:31:24 +00:00
|
|
|
muted: muted.o
|
2005-07-18 04:22:08 +00:00
|
|
|
$(CC) $(AUDIO_LIBS) -o muted muted.o
|
2004-05-17 06:31:24 +00:00
|
|
|
|
1999-12-05 07:16:40 +00:00
|
|
|
subdirs:
|
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
|
|
|
|
|
2006-02-12 16:52:42 +00:00
|
|
|
clean-depend:
|
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
|
|
|
|
rm -f .depend .tags-depend
|
|
|
|
|
|
|
|
clean: clean-depend
|
1999-12-05 07:16:40 +00:00
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
|
2006-02-12 16:52:42 +00:00
|
|
|
rm -f *.o *.so asterisk
|
2005-06-06 03:04:58 +00:00
|
|
|
rm -f defaults.h
|
|
|
|
rm -f include/asterisk/build.h
|
|
|
|
rm -f include/asterisk/version.h
|
2006-02-12 16:52:42 +00:00
|
|
|
rm -f .tags-sources tags TAGS
|
2004-12-14 23:36:30 +00:00
|
|
|
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
|
2005-01-20 16:22:59 +00:00
|
|
|
@if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C db1-ast clean
|
2003-09-13 20:51:48 +00:00
|
|
|
$(MAKE) -C stdtime clean
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2000-01-05 20:03:55 +00:00
|
|
|
datafiles: all
|
2006-03-03 17:15:51 +00:00
|
|
|
if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
|
2006-04-01 08:49:54 +00:00
|
|
|
# Should static HTTP be installed during make samples or even with its own target ala
|
|
|
|
# webvoicemail? There are portions here that *could* be customized but might also be
|
|
|
|
# improved a lot. I'll put it here for now.
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/static-http
|
|
|
|
for x in static-http/*; do \
|
|
|
|
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/static-http ; \
|
|
|
|
done
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
|
2005-07-12 03:23:31 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
|
2003-02-04 16:35:12 +00:00
|
|
|
for x in sounds/digits/*.gsm; do \
|
2004-12-14 23:36:30 +00:00
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \
|
2003-02-04 16:35:12 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2005-05-04 19:33:33 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate
|
|
|
|
for x in sounds/dictate/*.gsm; do \
|
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate ; \
|
2005-05-04 19:33:33 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
|
|
|
done
|
2004-05-03 00:54:16 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters
|
|
|
|
for x in sounds/letters/*.gsm; do \
|
2004-12-14 23:36:30 +00:00
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \
|
2004-05-03 00:54:16 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic
|
|
|
|
for x in sounds/phonetic/*.gsm; do \
|
2004-12-14 23:36:30 +00:00
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \
|
2004-05-03 00:54:16 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
|
|
|
done
|
2005-10-14 00:07:14 +00:00
|
|
|
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 \
|
2004-12-14 23:36:30 +00:00
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
|
2003-02-04 16:35:12 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/images
|
2001-09-24 21:29:03 +00:00
|
|
|
for x in images/*.jpg; do \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \
|
2001-09-24 21:29:03 +00:00
|
|
|
done
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(AGI_DIR)
|
2001-09-24 21:29:03 +00:00
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
update:
|
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
|
|
|
@if [ -d .svn ]; then \
|
|
|
|
echo "Updating from Subversion..." ; \
|
|
|
|
svn update | tee update.out; \
|
|
|
|
rm -f .version; \
|
|
|
|
if [ `grep -c ^C update.out` -gt 0 ]; then \
|
|
|
|
echo ; echo "The following files have conflicts:" ; \
|
|
|
|
grep ^C update.out | cut -b4- ; \
|
2005-03-11 08:24:23 +00:00
|
|
|
fi ; \
|
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
|
|
|
rm -f update.out; \
|
2006-02-12 16:52:42 +00:00
|
|
|
$(MAKE) clean-depend; \
|
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
|
|
|
elif [ -d CVS ]; then \
|
2003-02-04 16:35:12 +00:00
|
|
|
echo "Updating from CVS..." ; \
|
2004-12-29 23:52:42 +00:00
|
|
|
cvs -q -z3 update -Pd | tee update.out; \
|
2003-02-04 16:35:12 +00:00
|
|
|
rm -f .version; \
|
2004-12-29 23:52:42 +00:00
|
|
|
if [ `grep -c ^C update.out` -gt 0 ]; then \
|
|
|
|
echo ; echo "The following files have conflicts:" ; \
|
|
|
|
grep ^C update.out | cut -d' ' -f2- ; \
|
|
|
|
fi ; \
|
|
|
|
rm -f update.out; \
|
2006-02-12 16:52:42 +00:00
|
|
|
$(MAKE) clean-depend; \
|
2003-02-04 16:35:12 +00:00
|
|
|
else \
|
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
|
|
|
echo "Not under version control"; \
|
2003-02-04 16:35:12 +00:00
|
|
|
fi
|
|
|
|
|
2005-04-27 16:27:53 +00:00
|
|
|
NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
|
|
|
|
OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
|
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
bininstall: all
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(MODULES_DIR)
|
|
|
|
mkdir -p $(DESTDIR)$(ASTSBINDIR)
|
|
|
|
mkdir -p $(DESTDIR)$(ASTETCDIR)
|
|
|
|
mkdir -p $(DESTDIR)$(ASTBINDIR)
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
|
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
|
2005-05-04 19:33:33 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate
|
2005-02-27 19:07:46 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
|
2004-09-07 01:49:08 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
|
2005-03-12 05:37:32 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
|
2005-11-21 01:53:44 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
|
2005-11-01 21:53:30 +00:00
|
|
|
if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
|
|
|
|
if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
|
|
|
|
if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
|
2005-09-29 02:38:24 +00:00
|
|
|
ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
|
|
|
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
|
2004-01-12 03:19:25 +00:00
|
|
|
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
|
2005-08-14 02:19:16 +00:00
|
|
|
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
|
2005-09-12 04:06:52 +00:00
|
|
|
chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
|
2004-01-12 03:15:34 +00:00
|
|
|
fi
|
1999-12-05 07:16:40 +00:00
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
|
|
|
|
$(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
|
2005-04-27 05:46:32 +00:00
|
|
|
if [ -n "$(OLDHEADERS)" ]; then \
|
|
|
|
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
|
|
|
|
fi
|
2003-10-25 17:27:53 +00:00
|
|
|
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
|
|
|
|
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
|
2005-03-28 20:48:24 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
|
2004-02-24 21:27:16 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware
|
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax
|
2004-07-19 15:52:57 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTMANDIR)/man8
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
|
|
|
|
$(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
|
|
|
|
$(INSTALL) -m 644 asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
|
|
|
|
$(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8
|
|
|
|
$(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8
|
|
|
|
$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
|
2004-03-04 22:09:48 +00:00
|
|
|
if [ -d contrib/firmware/iax ]; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
|
2004-03-04 22:09:48 +00:00
|
|
|
else \
|
|
|
|
echo "You need to do cvs update -d not just cvs update" ; \
|
|
|
|
fi
|
2003-10-25 17:27:53 +00:00
|
|
|
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
|
2005-01-20 16:22:59 +00:00
|
|
|
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
|
2000-01-05 20:03:55 +00:00
|
|
|
@echo " +---- Asterisk Installation Complete -------+"
|
2001-09-24 21:29:03 +00:00
|
|
|
@echo " + +"
|
|
|
|
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
|
|
|
|
@echo " + +"
|
2000-01-05 20:03:55 +00:00
|
|
|
@echo " + Asterisk has successfully been installed. +"
|
|
|
|
@echo " + If you would like to install the sample +"
|
|
|
|
@echo " + configuration files (overwriting any +"
|
|
|
|
@echo " + existing config files), run: +"
|
|
|
|
@echo " + +"
|
2003-04-23 16:23:12 +00:00
|
|
|
@echo " + $(MAKE) samples +"
|
2000-01-05 20:03:55 +00:00
|
|
|
@echo " + +"
|
2001-09-24 21:29:03 +00:00
|
|
|
@echo " +----------------- or ---------------------+"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + You can go ahead and install the asterisk +"
|
|
|
|
@echo " + program documentation now or later run: +"
|
|
|
|
@echo " + +"
|
2003-04-23 16:23:12 +00:00
|
|
|
@echo " + $(MAKE) progdocs +"
|
2001-09-24 21:29:03 +00:00
|
|
|
@echo " + +"
|
|
|
|
@echo " + **Note** This requires that you have +"
|
|
|
|
@echo " + doxygen installed on your local system +"
|
|
|
|
@echo " +-------------------------------------------+"
|
2005-05-01 01:43:44 +00:00
|
|
|
@$(MAKE) -s oldmodcheck
|
|
|
|
|
|
|
|
NEWMODS=$(notdir $(wildcard */*.so))
|
|
|
|
OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
|
|
|
|
|
|
|
|
oldmodcheck:
|
2005-04-27 16:27:53 +00:00
|
|
|
@if [ -n "$(OLDMODS)" ]; then \
|
|
|
|
echo " WARNING WARNING WARNING" ;\
|
|
|
|
echo "" ;\
|
|
|
|
echo " Your Asterisk modules directory, located at" ;\
|
|
|
|
echo " $(DESTDIR)$(MODULES_DIR)" ;\
|
|
|
|
echo " contains modules that were not installed by this " ;\
|
|
|
|
echo " version of Asterisk. Please ensure that these" ;\
|
|
|
|
echo " modules are compatible with this version before" ;\
|
|
|
|
echo " attempting to run Asterisk." ;\
|
|
|
|
echo "" ;\
|
|
|
|
for f in $(OLDMODS); do \
|
|
|
|
echo " $$f" ;\
|
|
|
|
done ;\
|
|
|
|
echo "" ;\
|
|
|
|
echo " WARNING WARNING WARNING" ;\
|
|
|
|
fi
|
2003-02-04 16:35:12 +00:00
|
|
|
|
|
|
|
install: all datafiles bininstall
|
2005-09-30 14:48:41 +00:00
|
|
|
@if [ -x /usr/sbin/asterisk-post-install ]; then \
|
|
|
|
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
|
|
|
|
fi
|
2003-02-04 16:35:12 +00:00
|
|
|
|
|
|
|
upgrade: all bininstall
|
|
|
|
|
2005-08-23 02:30:30 +00:00
|
|
|
adsi:
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTETCDIR)
|
2002-06-21 01:40:13 +00:00
|
|
|
for x in configs/*.adsi; do \
|
2005-05-20 03:18:35 +00:00
|
|
|
if [ ! -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
|
2002-06-21 01:40:13 +00:00
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
|
2005-08-23 02:30:30 +00:00
|
|
|
samples: adsi
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTETCDIR)
|
2000-01-05 20:03:55 +00:00
|
|
|
for x in configs/*.sample; do \
|
2003-10-25 17:27:53 +00:00
|
|
|
if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
|
2004-11-19 14:04:57 +00:00
|
|
|
if [ "$(OVERWRITE)" = "y" ]; then \
|
2004-11-20 06:47:33 +00:00
|
|
|
if cmp -s $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $$x ; then \
|
|
|
|
echo "Config file $$x is unchanged"; \
|
|
|
|
continue; \
|
|
|
|
fi ; \
|
2004-11-19 14:04:57 +00:00
|
|
|
mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
|
|
|
|
else \
|
|
|
|
echo "Skipping config file $$x"; \
|
|
|
|
continue; \
|
|
|
|
fi ;\
|
2000-01-05 20:03:55 +00:00
|
|
|
fi ; \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2005-11-08 00:08:09 +00:00
|
|
|
if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
|
|
|
|
( \
|
|
|
|
echo "[directories]" ; \
|
|
|
|
echo "astetcdir => $(ASTETCDIR)" ; \
|
|
|
|
echo "astmoddir => $(MODULES_DIR)" ; \
|
|
|
|
echo "astvarlibdir => $(ASTVARLIBDIR)" ; \
|
|
|
|
echo "astagidir => $(AGI_DIR)" ; \
|
|
|
|
echo "astspooldir => $(ASTSPOOLDIR)" ; \
|
|
|
|
echo "astrundir => $(ASTVARRUNDIR)" ; \
|
|
|
|
echo "astlogdir => $(ASTLOGDIR)" ; \
|
|
|
|
echo "" ; \
|
|
|
|
echo "; Changing the following lines may compromise your security." ; \
|
|
|
|
echo ";[files]" ; \
|
|
|
|
echo ";astctlpermissions = 0660" ; \
|
|
|
|
echo ";astctlowner = root" ; \
|
|
|
|
echo ";astctlgroup = apache" ; \
|
|
|
|
echo ";astctl = asterisk.ctl" ; \
|
2006-03-30 06:07:04 +00:00
|
|
|
echo ";[options]" ; \
|
|
|
|
echo ";internal_timing = yes" ; \
|
2005-11-08 00:08:09 +00:00
|
|
|
) > $(DESTDIR)$(ASTCONFPATH) ; \
|
2004-11-19 14:04:57 +00:00
|
|
|
else \
|
|
|
|
echo "Skipping asterisk.conf creation"; \
|
|
|
|
fi
|
2005-08-23 02:30:30 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
|
2000-01-05 20:03:55 +00:00
|
|
|
for x in sounds/demo-*; do \
|
2004-12-14 23:36:30 +00:00
|
|
|
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
|
2003-02-04 16:35:12 +00:00
|
|
|
else \
|
|
|
|
echo "No description for $$x"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2005-08-23 02:30:30 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
|
2002-06-21 01:40:13 +00:00
|
|
|
for x in sounds/*.mp3; do \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
|
2002-06-21 01:40:13 +00:00
|
|
|
done
|
2004-08-01 14:19:04 +00:00
|
|
|
rm -f $(DESTDIR)$(ASTVARLIBDIR)/mohmp3/sample-hold.mp3
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
|
2004-01-08 16:52:11 +00:00
|
|
|
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
|
2000-01-05 20:03:55 +00:00
|
|
|
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
|
2004-01-08 16:52:11 +00:00
|
|
|
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2004-02-07 07:13:33 +00:00
|
|
|
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
|
2000-01-05 20:03:55 +00:00
|
|
|
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
|
2004-01-08 16:52:11 +00:00
|
|
|
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
|
2000-01-05 20:03:55 +00:00
|
|
|
done
|
2001-09-24 21:29:03 +00:00
|
|
|
|
2002-06-21 01:40:13 +00:00
|
|
|
webvmail:
|
2005-07-12 02:08:03 +00:00
|
|
|
@[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
|
|
|
|
@[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
|
2005-07-12 02:08:03 +00:00
|
|
|
mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
|
2002-06-21 01:40:13 +00:00
|
|
|
for x in images/*.gif; do \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
|
2002-06-21 01:40:13 +00:00
|
|
|
done
|
|
|
|
@echo " +--------- Asterisk Web Voicemail ----------+"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + Asterisk Web Voicemail is installed in +"
|
2005-07-12 02:08:03 +00:00
|
|
|
@echo " + your cgi-bin directory: +"
|
|
|
|
@echo " + $(DESTDIR)$(HTTP_CGIDIR)"
|
|
|
|
@echo " + IT USES A SETUID ROOT PERL SCRIPT, SO +"
|
|
|
|
@echo " + IF YOU DON'T LIKE THAT, UNINSTALL IT! +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + Other static items have been stored in: +"
|
|
|
|
@echo " + $(DESTDIR)$(HTTP_DOCSDIR)"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + If these paths do not match your httpd +"
|
|
|
|
@echo " + installation, correct the definitions +"
|
|
|
|
@echo " + in your Makefile of HTTP_CGIDIR and +"
|
|
|
|
@echo " + HTTP_DOCSDIR +"
|
2002-06-21 01:40:13 +00:00
|
|
|
@echo " + +"
|
|
|
|
@echo " +-------------------------------------------+"
|
|
|
|
|
2005-02-04 05:44:13 +00:00
|
|
|
spec:
|
|
|
|
sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
|
|
|
|
|
2001-09-24 21:29:03 +00:00
|
|
|
rpm: __rpm
|
|
|
|
|
2005-06-06 22:44:37 +00:00
|
|
|
__rpm: include/asterisk/version.h spec
|
2001-09-24 21:29:03 +00:00
|
|
|
rm -rf /tmp/asterisk ; \
|
|
|
|
mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
|
2003-10-25 17:27:53 +00:00
|
|
|
$(MAKE) DESTDIR=/tmp/asterisk install ; \
|
|
|
|
$(MAKE) DESTDIR=/tmp/asterisk samples ; \
|
2001-09-24 21:29:03 +00:00
|
|
|
mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
|
2005-11-30 21:30:18 +00:00
|
|
|
cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
|
2004-01-08 16:52:11 +00:00
|
|
|
rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
|
2004-04-16 18:57:07 +00:00
|
|
|
|
2001-09-24 21:29:03 +00:00
|
|
|
progdocs:
|
2005-11-17 21:45:03 +00:00
|
|
|
(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
|
2005-12-05 06:50:04 +00:00
|
|
|
echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
|
2002-06-21 01:40:13 +00:00
|
|
|
|
2004-08-07 01:26:09 +00:00
|
|
|
mpg123:
|
|
|
|
@wget -V >/dev/null || (echo "You need wget" ; false )
|
|
|
|
[ -f mpg123-0.59r.tar.gz ] || wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
|
|
|
|
[ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
|
2005-01-20 16:22:59 +00:00
|
|
|
$(MAKE) -C mpg123-0.59r $(MPG123TARG)
|
2004-08-07 01:26:09 +00:00
|
|
|
|
2002-06-21 01:40:13 +00:00
|
|
|
config:
|
|
|
|
if [ -d /etc/rc.d/init.d ]; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
|
2002-06-21 01:40:13 +00:00
|
|
|
/sbin/chkconfig --add asterisk; \
|
|
|
|
elif [ -d /etc/init.d ]; then \
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 755 init.asterisk /etc/init.d/asterisk; \
|
2002-06-21 01:40:13 +00:00
|
|
|
fi
|
|
|
|
|
2005-11-07 22:33:12 +00:00
|
|
|
dont-optimize: install
|
2003-03-18 06:00:18 +00:00
|
|
|
|
|
|
|
valgrind: dont-optimize
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
depend: include/asterisk/version.h .depend defaults.h
|
2003-05-06 00:00:20 +00:00
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
|
|
|
|
|
2005-07-10 15:53:05 +00:00
|
|
|
.depend: include/asterisk/version.h
|
2005-11-05 18:58:27 +00:00
|
|
|
build_tools/mkdep $(CFLAGS) $(wildcard *.c)
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2005-04-01 21:18:39 +00:00
|
|
|
.tags-depend:
|
|
|
|
@echo -n ".tags-depend: " > $@
|
|
|
|
@find . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
|
|
|
|
@find . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
|
2005-11-05 18:58:27 +00:00
|
|
|
@find $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
|
|
|
|
@find $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
|
2005-04-01 21:18:39 +00:00
|
|
|
@find include -name \*.h -printf "\t%p \\\\\n" >> $@
|
|
|
|
@echo >> $@
|
|
|
|
|
|
|
|
.tags-sources:
|
|
|
|
@rm -f $@
|
|
|
|
@find . -maxdepth 1 -name \*.c -print >> $@
|
|
|
|
@find . -maxdepth 1 -name \*.h -print >> $@
|
2005-11-05 18:58:27 +00:00
|
|
|
@find $(SUBDIRS) -name \*.c -print >> $@
|
|
|
|
@find $(SUBDIRS) -name \*.h -print >> $@
|
2005-04-01 21:18:39 +00:00
|
|
|
@find include -name \*.h -print >> $@
|
|
|
|
|
|
|
|
tags: .tags-depend .tags-sources
|
|
|
|
ctags -L .tags-sources -o $@
|
|
|
|
|
|
|
|
ctags: tags
|
|
|
|
|
|
|
|
TAGS: .tags-depend .tags-sources
|
|
|
|
etags -o $@ `cat .tags-sources`
|
|
|
|
|
|
|
|
etags: TAGS
|
|
|
|
|
2003-09-27 15:52:17 +00:00
|
|
|
FORCE:
|
2004-04-16 18:57:07 +00:00
|
|
|
|
|
|
|
%_env:
|
2005-01-20 16:22:59 +00:00
|
|
|
$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
|
2004-04-16 18:57:07 +00:00
|
|
|
|
|
|
|
env:
|
2004-04-27 21:30:32 +00:00
|
|
|
env
|
2005-01-17 04:48:51 +00:00
|
|
|
|
|
|
|
# If the cleancount has been changed, force a make clean.
|
|
|
|
# .cleancount is the global clean count, and .lastclean is the
|
2005-04-01 21:18:39 +00:00
|
|
|
# last clean count we had
|
2005-01-17 04:48:51 +00:00
|
|
|
# We can avoid this by making noclean
|
|
|
|
|
|
|
|
cleantest:
|
2005-05-20 03:18:35 +00:00
|
|
|
if cmp -s .cleancount .lastclean ; then echo ; else \
|
2005-01-20 16:22:59 +00:00
|
|
|
$(MAKE) clean; cp -f .cleancount .lastclean;\
|
2005-01-17 04:48:51 +00:00
|
|
|
fi
|
2006-02-01 18:39:41 +00:00
|
|
|
|
|
|
|
_uninstall:
|
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/*
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
|
|
|
|
rm -rf $(DESTDIR)$(ASTHEADERDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds
|
|
|
|
rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware
|
|
|
|
rm -rf $(DESTDIR)$(ASTMANDIR)/man8
|
|
|
|
for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
|
|
|
|
|
|
|
|
uninstall: _uninstall
|
|
|
|
@echo " +--------- Asterisk Uninstall Complete -----+"
|
|
|
|
@echo " + Asterisk binaries, sounds, man pages, +"
|
|
|
|
@echo " + headers, modules, and firmware builds, +"
|
|
|
|
@echo " + have all been uninstalled. +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + To remove ALL traces of Asterisk, +"
|
|
|
|
@echo " + including configuration, spool +"
|
|
|
|
@echo " + directories, and logs, run the following +"
|
|
|
|
@echo " + command: +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + $(MAKE) uninstall-all +"
|
|
|
|
@echo " +-------------------------------------------+"
|
|
|
|
|
|
|
|
uninstall-all: _uninstall
|
|
|
|
rm -rf $(DESTDIR)$(ASTLIBDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTVARLIBDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTETCDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTLOGDIR)
|