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
|
|
|
|
#
|
|
|
|
|
2006-07-15 20:12:28 +00:00
|
|
|
# All Makefiles use the following variables:
|
|
|
|
#
|
|
|
|
# LDFLAGS - linker flags (not libraries), used for all links
|
|
|
|
# LIBS - additional libraries, at top-level for all links,
|
|
|
|
# on a single object just for that object
|
|
|
|
# SOLINK - linker flags used only for creating shared objects (.so files),
|
|
|
|
# used for all .so links
|
|
|
|
#
|
|
|
|
|
1999-12-05 07:16:40 +00:00
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
|
2006-07-06 23:18:45 +00:00
|
|
|
#Uncomment this to see all build commands instead of 'quiet' output
|
|
|
|
#NOISY_BUILD=yes
|
|
|
|
|
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
|
|
|
|
|
2005-08-07 14:59:41 +00:00
|
|
|
ifeq ($(CROSS_COMPILE),)
|
2006-07-06 21:04:28 +00:00
|
|
|
OSARCH:=$(shell uname -s)
|
|
|
|
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-07-06 21:04:28 +00:00
|
|
|
ASTTOPDIR:=$(shell pwd)
|
2006-02-23 22:38:47 +00:00
|
|
|
|
2005-09-08 00:34:19 +00:00
|
|
|
# Remember the MAKELEVEL at the top
|
|
|
|
MAKETOPLEVEL?=$(MAKELEVEL)
|
|
|
|
|
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)
|
2006-05-11 13:15:10 +00:00
|
|
|
DEBUG=-g3
|
2003-03-18 06:00:18 +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
|
2006-05-11 13:15:10 +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
|
2006-05-11 13:15:10 +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
|
2006-05-11 13:15:10 +00:00
|
|
|
#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
|
2006-05-11 13:15:10 +00:00
|
|
|
#BUSYDETECT+= -DBUSYDETECT_COMPARE_TONE_AND_SILENCE
|
2003-06-17 21:53:18 +00:00
|
|
|
|
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)
|
2006-06-29 22:01:41 +00:00
|
|
|
ASTETCDIR=/var/etc/asterisk
|
2006-05-19 18:54:21 +00:00
|
|
|
ASTLIBDIR=/opt/asterisk/lib
|
2006-06-29 22:01:41 +00:00
|
|
|
ASTVARLIBDIR=/var/opt/asterisk
|
|
|
|
ASTSPOOLDIR=/var/spool/asterisk
|
|
|
|
ASTLOGDIR=/var/log/asterisk
|
|
|
|
ASTHEADERDIR=/opt/asterisk/include
|
|
|
|
ASTBINDIR=/opt/asterisk/bin
|
|
|
|
ASTSBINDIR=/opt/asterisk/sbin
|
|
|
|
ASTVARRUNDIR=/var/run/asterisk
|
|
|
|
ASTMANDIR=/opt/asterisk/man
|
2006-04-07 07:04:05 +00:00
|
|
|
else
|
2006-05-19 18:54:21 +00:00
|
|
|
ASTETCDIR=$(sysconfdir)/asterisk
|
|
|
|
ASTLIBDIR=$(libdir)/asterisk
|
|
|
|
ASTHEADERDIR=$(includedir)/asterisk
|
|
|
|
ASTBINDIR=$(bindir)
|
|
|
|
ASTSBINDIR=$(sbindir)
|
2006-05-25 22:05:12 +00:00
|
|
|
ASTSPOOLDIR=$(localstatedir)/spool/asterisk
|
|
|
|
ASTLOGDIR=$(localstatedir)/log/asterisk
|
2006-05-19 18:54:21 +00:00
|
|
|
ASTVARRUNDIR=$(localstatedir)/run
|
|
|
|
ASTMANDIR=$(mandir)
|
2006-05-25 22:05:12 +00:00
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
|
|
|
ASTVARLIBDIR=$(prefix)/share/asterisk
|
|
|
|
else
|
|
|
|
ASTVARLIBDIR=$(localstatedir)/lib/asterisk
|
|
|
|
endif
|
2006-04-07 07:04:05 +00:00
|
|
|
endif
|
2006-04-15 22:53:53 +00:00
|
|
|
ASTDATADIR?=$(ASTVARLIBDIR)
|
2006-04-07 07:04:05 +00:00
|
|
|
|
|
|
|
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
|
|
|
|
# when starting Asterisk
|
|
|
|
ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
|
|
|
|
MODULES_DIR=$(ASTLIBDIR)/modules
|
2006-04-15 22:53:53 +00:00
|
|
|
AGI_DIR=$(ASTDATADIR)/agi-bin
|
2006-04-07 07:04:05 +00:00
|
|
|
|
|
|
|
# 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-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
|
2006-04-24 17:11:45 +00:00
|
|
|
# include all of your favorite menuselect options so that every time you download
|
|
|
|
# a new version of Asterisk, you don't have to run menuselect to set them.
|
|
|
|
# The file /etc/asterisk.makeopts will also be included but can be overridden
|
2005-07-18 18:34:52 +00:00
|
|
|
# by the file in your home directory.
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
|
|
|
|
USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
|
|
|
|
|
|
|
|
ifneq ($(wildcard menuselect.makeopts),)
|
|
|
|
include menuselect.makeopts
|
2006-06-25 08:50:14 +00:00
|
|
|
include menuselect.makedeps
|
2006-04-24 17:11:45 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(wildcard makeopts),)
|
|
|
|
include makeopts
|
2005-07-18 18:34:52 +00:00
|
|
|
endif
|
2005-07-14 19:40:15 +00:00
|
|
|
|
2006-06-07 18:54:56 +00:00
|
|
|
TOPDIR_CFLAGS=-Iinclude
|
|
|
|
MOD_SUBDIR_CFLAGS=-I../include -I..
|
|
|
|
OTHER_SUBDIR_CFLAGS=-I../include -I..
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-06-28 15:10:57 +00:00
|
|
|
ifeq ($(origin MENUSELECT_CFLAGS),undefined)
|
2006-06-28 21:26:31 +00:00
|
|
|
MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(USER_MAKEOPTS) .)
|
2006-06-28 21:33:39 +00:00
|
|
|
ifeq ($(MENUSELECT_CFLAGS),)
|
|
|
|
MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(GLOBAL_MAKEOPTS) .)
|
|
|
|
endif
|
2006-06-28 21:26:31 +00:00
|
|
|
ifneq ($(MENUSELECT_CFLAGS),)
|
|
|
|
MENUSELECT_CFLAGS:=$(shell echo $(MENUSELECT_CFLAGS) | cut -f2 -d'=')
|
|
|
|
endif
|
2006-06-28 15:10:57 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-28 21:20:15 +00:00
|
|
|
ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),$(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)))
|
2006-06-06 00:25:23 +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.
|
|
|
|
#K6OPT = -DK6OPT
|
|
|
|
|
|
|
|
# Tell gcc to optimize the code
|
|
|
|
OPTIMIZE+=-O6
|
|
|
|
else
|
|
|
|
# Stack backtraces, while useful for debugging, are incompatible with optimizations
|
2006-06-16 16:45:52 +00:00
|
|
|
ifeq ($(OSARCH),Linux)
|
2006-06-06 00:25:23 +00:00
|
|
|
CFLAGS+=-DSTACK_BACKTRACES
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
# *CLI> show memory allocations [filename]
|
|
|
|
# *CLI> show memory summary [filename]
|
2006-05-11 21:24:54 +00:00
|
|
|
ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
|
2006-04-24 17:11:45 +00:00
|
|
|
TOPDIR_CFLAGS+=-include include/asterisk/astmm.h
|
|
|
|
MOD_SUBDIR_CFLAGS+=-include ../include/asterisk/astmm.h
|
2005-07-14 19:40:15 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
MOD_SUBDIR_CFLAGS+=-fPIC
|
|
|
|
|
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
|
|
|
|
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)
|
2006-04-30 13:56:37 +00:00
|
|
|
OPTIONS+=-fsigned-char -mcpu=xscale
|
2005-08-30 02:54:02 +00:00
|
|
|
else
|
2006-04-30 13:56:37 +00:00
|
|
|
OPTIONS+=-fsigned-char
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
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
|
|
|
|
|
2006-05-13 10:37:26 +00:00
|
|
|
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
|
2006-06-22 14:16:41 +00:00
|
|
|
ifneq ($(OPTIMIZE),)
|
2005-09-08 00:34:19 +00:00
|
|
|
ASTCFLAGS+=$(OPTIMIZE)
|
2006-06-22 14:16:41 +00:00
|
|
|
endif
|
2006-04-24 17:11:45 +00:00
|
|
|
|
|
|
|
ifeq ($(AST_DEVMODE),yes)
|
|
|
|
ASTCFLAGS+=-Werror -Wunused
|
|
|
|
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-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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
|
2004-06-22 17:42:14 +00:00
|
|
|
endif # FreeBSD
|
|
|
|
|
2005-11-05 18:58:27 +00:00
|
|
|
ifeq ($(OSARCH),NetBSD)
|
2006-05-13 10:37:26 +00:00
|
|
|
AST_CFLAGS+=-pthread -I$(CROSS_COMPILE_TARGET)/usr/pkg/include
|
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)
|
2006-06-29 22:01:41 +00:00
|
|
|
ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/opt/ssl/include -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
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
LIBEDIT=editline/libedit.a
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ASTERISKVERSION:=$(shell build_tools/make_version .)
|
|
|
|
|
2005-08-30 02:54:02 +00:00
|
|
|
ifneq ($(wildcard .version),)
|
2005-11-28 03:59:39 +00:00
|
|
|
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
|
|
|
|
2006-06-19 15:17:32 +00:00
|
|
|
ifneq ($(wildcard .svn),)
|
2005-08-30 02:54:02 +00:00
|
|
|
ASTERISKVERSIONNUM=999999
|
|
|
|
endif
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2006-05-11 13:15:10 +00:00
|
|
|
ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
|
2005-12-27 06:24:28 +00:00
|
|
|
|
2006-06-22 15:08:08 +00:00
|
|
|
MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs
|
|
|
|
OTHER_SUBDIRS:=utils agi
|
2006-05-18 06:41:53 +00:00
|
|
|
SUBDIRS:=$(MOD_SUBDIRS) $(OTHER_SUBDIRS)
|
2006-06-22 12:48:25 +00:00
|
|
|
SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
|
2006-06-22 14:31:52 +00:00
|
|
|
SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
|
|
|
|
SUBDIRS_CLEAN_DEPEND:=$(SUBDIRS:%=%-clean-depend)
|
2006-06-22 15:08:08 +00:00
|
|
|
MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend)
|
|
|
|
OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend)
|
|
|
|
SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND)
|
2006-06-22 15:38:13 +00:00
|
|
|
SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
|
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-06-01 14:07:03 +00:00
|
|
|
cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.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.
|
2006-05-11 13:15:10 +00:00
|
|
|
OBJS+=stdtime/localtime.o
|
2006-03-23 14:28:16 +00:00
|
|
|
|
|
|
|
# At the moment say.o is an optional component which can be overridden
|
|
|
|
# by a module.
|
2006-05-11 13:15:10 +00:00
|
|
|
OBJS+=say.o
|
2006-03-23 14:28:16 +00:00
|
|
|
|
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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
|
2005-08-31 03:32:15 +00:00
|
|
|
else
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=$(EDITLINE_LIB) -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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_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)
|
2006-07-15 20:12:28 +00:00
|
|
|
LDFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
2006-01-27 05:33:20 +00:00
|
|
|
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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
|
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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
|
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)
|
2006-07-15 19:59:35 +00:00
|
|
|
AST_LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
|
2005-08-30 02:54:02 +00:00
|
|
|
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))
|
2006-05-13 10:54:40 +00:00
|
|
|
CFLAGS+=$(TOPDIR_CFLAGS)$(ASTCFLAGS)
|
2005-09-08 00:34:19 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-14 19:00:38 +00:00
|
|
|
# This is used when generating the doxygen documentation
|
2006-04-24 17:11:45 +00:00
|
|
|
ifneq ($(DOT),:)
|
2005-11-14 19:00:38 +00:00
|
|
|
HAVEDOT=yes
|
|
|
|
else
|
|
|
|
HAVEDOT=no
|
|
|
|
endif
|
|
|
|
|
2006-07-06 23:18:45 +00:00
|
|
|
include Makefile.rules
|
|
|
|
|
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 " + +"
|
2006-04-24 17:11:45 +00:00
|
|
|
@echo " + make install +"
|
2000-01-05 20:03:55 +00:00
|
|
|
@echo " +-------------------------------------------+"
|
|
|
|
|
2006-07-15 19:59:35 +00:00
|
|
|
all: cleantest config.status menuselect.makeopts depend $(SUBDIRS) asterisk
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-06-22 15:38:13 +00:00
|
|
|
$(MOD_SUBDIRS):
|
2006-06-22 14:31:52 +00:00
|
|
|
@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
|
|
|
|
|
2006-06-22 15:38:13 +00:00
|
|
|
$(OTHER_SUBDIRS):
|
2006-06-22 14:31:52 +00:00
|
|
|
@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
|
|
|
|
|
2006-05-08 15:20:00 +00:00
|
|
|
config.status: configure
|
2006-04-24 17:11:45 +00:00
|
|
|
@CFLAGS="" ./configure
|
|
|
|
@echo "****"
|
|
|
|
@echo "**** The configure script was just executed, so 'make' needs to be"
|
|
|
|
@echo "**** restarted."
|
|
|
|
@echo "****"
|
2006-04-24 17:24:03 +00:00
|
|
|
@exit 1
|
2006-04-24 17:11:45 +00:00
|
|
|
|
|
|
|
makeopts: configure
|
|
|
|
@CFLAGS="" ./configure
|
|
|
|
@echo "****"
|
|
|
|
@echo "**** The configure script was just executed, so 'make' needs to be"
|
|
|
|
@echo "**** restarted."
|
|
|
|
@echo "****"
|
2006-04-24 17:24:03 +00:00
|
|
|
@exit 1
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-06-27 18:49:04 +00:00
|
|
|
menuselect.makeopts menuselect.makedeps: menuselect/menuselect makeopts.xml
|
2006-07-01 03:23:18 +00:00
|
|
|
menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
|
2006-06-26 14:38:55 +00:00
|
|
|
|
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
|
|
|
|
|
2003-02-04 16:35:12 +00:00
|
|
|
editline/config.h:
|
2006-07-15 19:59:35 +00:00
|
|
|
cd editline && unset CFLAGS AST_LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
editline/libedit.a:
|
2006-07-15 19:59:35 +00:00
|
|
|
cd editline && unset CFLAGS AST_LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C editline libedit.a
|
2003-02-04 16:35:12 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
db1-ast/libdb1.a:
|
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
|
|
|
|
|
2006-05-10 10:48:29 +00:00
|
|
|
ast_expr2.c ast_expr2.h:
|
2006-05-08 14:34:32 +00:00
|
|
|
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
|
2005-05-19 04:08:01 +00:00
|
|
|
|
2005-08-26 19:55:11 +00:00
|
|
|
ast_expr2f.c:
|
2006-05-08 14:34:32 +00:00
|
|
|
flex -o $@ --full ast_expr2.fl
|
2002-09-02 15:20:28 +00:00
|
|
|
|
2006-06-20 01:06:50 +00:00
|
|
|
testexpr2: config.status include/asterisk/buildopts.h ast_expr2f.c ast_expr2.c ast_expr2.h
|
|
|
|
$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
|
|
|
|
$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2.c
|
|
|
|
$(CC) -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
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
defaults.h: makeopts
|
2006-05-10 14:35:38 +00:00
|
|
|
@build_tools/make_defaults_h > $@.tmp
|
2006-06-19 15:17:32 +00:00
|
|
|
@if cmp -s $@.tmp $@ ; then : ; else \
|
2005-06-06 03:04:58 +00:00
|
|
|
mv $@.tmp $@ ; \
|
|
|
|
fi
|
2006-05-10 14:35:38 +00:00
|
|
|
@rm -f $@.tmp
|
2005-06-06 03:04:58 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
include/asterisk/version.h:
|
2006-05-10 14:35:38 +00:00
|
|
|
@build_tools/make_version_h > $@.tmp
|
2006-06-19 15:17:32 +00:00
|
|
|
@if cmp -s $@.tmp $@ ; then : ; else \
|
2005-06-06 03:04:58 +00:00
|
|
|
mv $@.tmp $@ ; \
|
|
|
|
fi
|
2006-05-10 14:35:38 +00:00
|
|
|
@rm -f $@.tmp
|
2001-05-09 03:11:22 +00:00
|
|
|
|
2006-05-11 09:50:41 +00:00
|
|
|
include/asterisk/buildopts.h: menuselect.makeopts
|
|
|
|
@build_tools/make_buildopts_h > $@.tmp
|
2006-06-19 15:17:32 +00:00
|
|
|
@if cmp -s $@.tmp $@ ; then : ; else \
|
2006-05-11 09:50:41 +00:00
|
|
|
mv $@.tmp $@ ; \
|
|
|
|
fi
|
|
|
|
@rm -f $@.tmp
|
|
|
|
|
2006-06-26 06:27:25 +00:00
|
|
|
channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
|
2006-06-24 19:43:31 +00:00
|
|
|
|
2006-06-18 20:33:53 +00:00
|
|
|
asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
|
2006-07-06 23:18:45 +00:00
|
|
|
@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 \
|
2005-11-05 18:58:27 +00:00
|
|
|
mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
|
|
|
|
fi
|
2006-07-06 23:18:45 +00:00
|
|
|
@rm -f include/asterisk/build.h.tmp
|
|
|
|
@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
|
2006-07-15 19:59:35 +00:00
|
|
|
@echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) -> $@"
|
|
|
|
@$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS)
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2004-05-17 06:31:24 +00:00
|
|
|
muted: muted.o
|
2006-07-15 16:40:05 +00:00
|
|
|
muted: LIBS+=$(AUDIO_LIBS)
|
2004-05-17 06:31:24 +00:00
|
|
|
|
2006-06-22 14:31:52 +00:00
|
|
|
$(SUBDIRS_CLEAN_DEPEND):
|
|
|
|
@$(MAKE) -C $(@:-clean-depend=) clean-depend
|
2006-06-22 12:14:29 +00:00
|
|
|
|
2006-06-22 14:31:52 +00:00
|
|
|
$(SUBDIRS_CLEAN):
|
|
|
|
@$(MAKE) -C $(@:-clean=) clean
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2006-06-22 14:31:52 +00:00
|
|
|
clean-depend: $(SUBDIRS_CLEAN_DEPEND)
|
2006-02-12 16:52:42 +00:00
|
|
|
|
2006-06-22 14:31:52 +00:00
|
|
|
clean: $(SUBDIRS_CLEAN) clean-depend
|
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
|
2006-06-22 14:31:52 +00:00
|
|
|
rm -f .depend .tags-depend
|
2004-12-14 23:36:30 +00:00
|
|
|
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
|
2006-06-22 14:31:52 +00:00
|
|
|
@$(MAKE) -C db1-ast clean
|
|
|
|
@$(MAKE) -C stdtime clean
|
2006-06-24 04:42:35 +00:00
|
|
|
@$(MAKE) -C menuselect clean
|
1999-12-05 07:16:40 +00:00
|
|
|
|
2006-07-01 14:25:43 +00:00
|
|
|
dist-clean: distclean
|
2006-04-28 17:39:54 +00:00
|
|
|
|
2006-07-01 14:25:43 +00:00
|
|
|
distclean: clean
|
2006-06-22 14:31:52 +00:00
|
|
|
@$(MAKE) -C mxml clean
|
2006-06-24 04:42:35 +00:00
|
|
|
@$(MAKE) -C menuselect dist-clean
|
2006-06-22 14:31:52 +00:00
|
|
|
@$(MAKE) -C sounds dist-clean
|
2006-06-25 08:50:14 +00:00
|
|
|
rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
|
2006-04-24 17:11:45 +00:00
|
|
|
rm -f config.log config.status
|
2006-06-23 02:15:35 +00:00
|
|
|
rm -rf autom4te.cache
|
2006-07-01 14:29:06 +00:00
|
|
|
rm -f include/asterisk/autoconfig.h
|
2006-05-11 09:50:41 +00:00
|
|
|
rm -f include/asterisk/buildopts.h
|
2006-06-23 08:32:19 +00:00
|
|
|
rm -rf doc/api
|
2006-07-01 04:37:52 +00:00
|
|
|
rm -f build_tools/menuselect-deps
|
2006-04-24 17:11:45 +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-24 17:11:45 +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.
|
2006-04-15 22:53:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTDATADIR)/static-http
|
2006-04-01 08:49:54 +00:00
|
|
|
for x in static-http/*; do \
|
2006-04-30 04:34:04 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \
|
2006-04-01 08:49:54 +00:00
|
|
|
done
|
2006-04-15 22:53:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTDATADIR)/images
|
2001-09-24 21:29:03 +00:00
|
|
|
for x in images/*.jpg; do \
|
2006-04-15 22:53:53 +00:00
|
|
|
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
|
2001-09-24 21:29:03 +00:00
|
|
|
done
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(AGI_DIR)
|
2006-06-07 21:05:05 +00:00
|
|
|
$(MAKE) -C sounds install
|
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; \
|
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 asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
|
2006-06-22 10:38:45 +00:00
|
|
|
$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
2006-05-11 10:12:34 +00:00
|
|
|
$(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
|
2005-10-25 12:47:54 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
|
2006-06-07 19:05:35 +00:00
|
|
|
$(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir)
|
2005-10-25 12:47:54 +00:00
|
|
|
$(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
|
|
|
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
|
2005-03-28 20:48:24 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
|
2006-04-15 23:37:29 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTDATADIR)/keys
|
|
|
|
mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware
|
|
|
|
mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax
|
2004-07-19 15:52:57 +00:00
|
|
|
mkdir -p $(DESTDIR)$(ASTMANDIR)/man8
|
2006-04-15 23:37:29 +00:00
|
|
|
$(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys
|
|
|
|
$(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys
|
2005-10-25 12:47:54 +00:00
|
|
|
$(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
|
2006-06-19 15:17:32 +00:00
|
|
|
$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
|
2006-04-29 11:42:31 +00:00
|
|
|
|
2006-06-22 12:33:50 +00:00
|
|
|
$(SUBDIRS_INSTALL):
|
|
|
|
@$(MAKE) -C $(@:-install=) install
|
2005-05-01 01:43:44 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2006-06-22 12:33:50 +00:00
|
|
|
install: all datafiles bininstall $(SUBDIRS_INSTALL)
|
2005-09-30 14:48:41 +00:00
|
|
|
@if [ -x /usr/sbin/asterisk-post-install ]; then \
|
|
|
|
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
|
|
|
|
fi
|
2006-04-29 11:42:31 +00:00
|
|
|
@echo " +---- Asterisk Installation Complete -------+"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
|
|
|
|
@echo " + +"
|
|
|
|
@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 " + +"
|
|
|
|
@echo " + $(MAKE) samples +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " +----------------- or ---------------------+"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + You can go ahead and install the asterisk +"
|
|
|
|
@echo " + program documentation now or later run: +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + $(MAKE) progdocs +"
|
|
|
|
@echo " + +"
|
|
|
|
@echo " + **Note** This requires that you have +"
|
|
|
|
@echo " + doxygen installed on your local system +"
|
|
|
|
@echo " +-------------------------------------------+"
|
|
|
|
@$(MAKE) -s oldmodcheck
|
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 \
|
2006-06-16 16:45:52 +00:00
|
|
|
if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \
|
2006-06-22 10:36:45 +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 \
|
2006-06-22 10:36:45 +00:00
|
|
|
if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \
|
2004-11-19 14:04:57 +00:00
|
|
|
if [ "$(OVERWRITE)" = "y" ]; then \
|
2006-06-22 10:36:45 +00:00
|
|
|
if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \
|
2004-11-20 06:47:33 +00:00
|
|
|
echo "Config file $$x is unchanged"; \
|
|
|
|
continue; \
|
|
|
|
fi ; \
|
2006-06-22 10:36:45 +00:00
|
|
|
mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \
|
2004-11-19 14:04:57 +00:00
|
|
|
else \
|
|
|
|
echo "Skipping config file $$x"; \
|
|
|
|
continue; \
|
|
|
|
fi ;\
|
2000-01-05 20:03:55 +00:00
|
|
|
fi ; \
|
2006-06-22 10:36:45 +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)" ; \
|
2006-04-15 22:53:53 +00:00
|
|
|
echo "astdatadir => $(ASTDATADIR)" ; \
|
2005-11-08 00:08:09 +00:00
|
|
|
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
|
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 \
|
2006-04-15 22:53:53 +00:00
|
|
|
cat $(DESTDIR)$(ASTDATADIR)/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 \
|
2006-04-15 22:53:53 +00:00
|
|
|
cat $(DESTDIR)$(ASTDATADIR)/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
|
|
|
|
|
2006-05-11 09:50:41 +00:00
|
|
|
__rpm: include/asterisk/version.h include/asterisk/buildopts.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
|
|
|
|
|
|
|
config:
|
2006-05-05 22:49:55 +00:00
|
|
|
@if [ "${OSARCH}" = "Linux" ]; then \
|
|
|
|
if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
|
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
|
|
|
|
/sbin/chkconfig --add asterisk; \
|
|
|
|
elif [ -f /etc/debian_version ]; then \
|
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \
|
|
|
|
/usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \
|
|
|
|
elif [ -f /etc/gentoo-release ]; then \
|
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \
|
|
|
|
/sbin/rc-update add asterisk default; \
|
|
|
|
elif [ -f /etc/mandrake-release ]; then \
|
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \
|
|
|
|
/sbin/chkconfig --add asterisk; \
|
|
|
|
elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \
|
|
|
|
$(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \
|
|
|
|
/sbin/chkconfig --add asterisk; \
|
|
|
|
elif [ -f /etc/slackware-version ]; then \
|
|
|
|
echo "Slackware is not currently supported, although an init script does exist for it." \
|
|
|
|
else \
|
|
|
|
echo "We could not install init scripts for your distribution."; \
|
|
|
|
fi \
|
|
|
|
else \
|
|
|
|
echo "We could not install init scripts for your operating system."; \
|
|
|
|
fi
|
2002-06-21 01:40:13 +00:00
|
|
|
|
2006-05-02 17:15:37 +00:00
|
|
|
dont-optimize: _all
|
2003-03-18 06:00:18 +00:00
|
|
|
|
|
|
|
valgrind: dont-optimize
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-06-22 15:08:08 +00:00
|
|
|
$(MOD_SUBDIRS_DEPEND):
|
|
|
|
@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
|
|
|
|
|
|
|
|
$(OTHER_SUBDIRS_DEPEND):
|
|
|
|
@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend
|
|
|
|
|
|
|
|
depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h $(SUBDIRS_DEPEND)
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-05-11 09:50:41 +00:00
|
|
|
.depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.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: " > $@
|
2006-06-22 10:38:45 +00:00
|
|
|
@$(FIND) . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
|
|
|
|
@$(FIND) . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
|
|
|
|
@$(FIND) $(SUBDIRS) -name \*.c -printf "\t%p \\\\\n" >> $@
|
|
|
|
@$(FIND) $(SUBDIRS) -name \*.h -printf "\t%p \\\\\n" >> $@
|
|
|
|
@$(FIND) include -name \*.h -printf "\t%p \\\\\n" >> $@
|
2005-04-01 21:18:39 +00:00
|
|
|
@echo >> $@
|
|
|
|
|
|
|
|
.tags-sources:
|
|
|
|
@rm -f $@
|
2006-06-22 10:38:45 +00:00
|
|
|
@$(FIND) . -maxdepth 1 -name \*.c -print >> $@
|
|
|
|
@$(FIND) . -maxdepth 1 -name \*.h -print >> $@
|
|
|
|
@$(FIND) $(SUBDIRS) -name \*.c -print >> $@
|
|
|
|
@$(FIND) $(SUBDIRS) -name \*.h -print >> $@
|
|
|
|
@$(FIND) include -name \*.h -print >> $@
|
2005-04-01 21:18:39 +00:00
|
|
|
|
|
|
|
tags: .tags-depend .tags-sources
|
|
|
|
ctags -L .tags-sources -o $@
|
|
|
|
|
|
|
|
ctags: tags
|
|
|
|
|
|
|
|
TAGS: .tags-depend .tags-sources
|
|
|
|
etags -o $@ `cat .tags-sources`
|
|
|
|
|
|
|
|
etags: TAGS
|
|
|
|
|
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
|
|
|
|
2006-06-07 20:54:30 +00:00
|
|
|
sounds:
|
|
|
|
$(MAKE) -C sounds all
|
|
|
|
|
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
|
|
|
|
|
|
|
cleantest:
|
2006-05-10 14:35:38 +00:00
|
|
|
@if cmp -s .cleancount .lastclean ; then echo ; else \
|
2006-05-11 10:28:37 +00:00
|
|
|
$(MAKE) clean; cp -f .cleancount .lastclean;\
|
2006-06-01 00:09:18 +00:00
|
|
|
$(MAKE) defaults.h;\
|
2005-01-17 04:48:51 +00:00
|
|
|
fi
|
2006-02-01 18:39:41 +00:00
|
|
|
|
2006-06-22 15:38:13 +00:00
|
|
|
$(SUBDIRS_UNINSTALL):
|
|
|
|
@$(MAKE) -C $(@:-uninstall=) uninstall
|
|
|
|
|
|
|
|
_uninstall: $(SUBDIRS_UNINSTALL)
|
2006-02-01 18:39:41 +00:00
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/*
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
|
|
|
|
rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
|
|
|
|
rm -rf $(DESTDIR)$(ASTHEADERDIR)
|
2006-04-15 23:37:29 +00:00
|
|
|
rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
|
2006-02-01 18:39:41 +00:00
|
|
|
rm -rf $(DESTDIR)$(ASTMANDIR)/man8
|
2006-06-07 21:05:05 +00:00
|
|
|
$(MAKE) -C sounds uninstall
|
2006-02-01 18:39:41 +00:00
|
|
|
|
|
|
|
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)
|
2006-04-15 22:53:53 +00:00
|
|
|
rm -rf $(DESTDIR)$(ASTDATADIR)
|
2006-02-01 18:39:41 +00:00
|
|
|
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTETCDIR)
|
|
|
|
rm -rf $(DESTDIR)$(ASTLOGDIR)
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-06-23 14:19:35 +00:00
|
|
|
menuselect: menuselect/menuselect makeopts.xml
|
2006-07-01 03:21:56 +00:00
|
|
|
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-07-19 21:52:59 +00:00
|
|
|
menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
|
2006-07-06 21:04:28 +00:00
|
|
|
@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
|
2006-04-24 17:11:45 +00:00
|
|
|
|
|
|
|
mxml/libmxml.a:
|
2006-07-15 19:59:35 +00:00
|
|
|
@cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
|
2006-04-24 17:11:45 +00:00
|
|
|
$(MAKE) -C mxml libmxml.a
|
|
|
|
|
2006-07-07 00:48:40 +00:00
|
|
|
makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
|
2006-04-24 17:11:45 +00:00
|
|
|
@echo "Generating list of available modules ..."
|
2006-07-07 02:33:24 +00:00
|
|
|
@build_tools/prep_moduledeps > $@
|
2006-06-22 15:38:13 +00:00
|
|
|
|
2006-06-24 04:34:55 +00:00
|
|
|
.PHONY: menuselect sounds clean clean-depend dist-clean distclean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL) $(SUBDIRS)
|