@ -25,72 +25,6 @@ HOST_CC=gcc
# CROSS_PROC=arm
# SUB_PROC=xscale # or maverick
i f e q ( $( CROSS_COMPILE ) , )
OSARCH = $( shell uname -s)
e l s e
OSARCH = $( CROSS_ARCH)
e n d i f
i f e q ( $ { O S A R C H } , L i n u x )
i f e q ( $( CROSS_COMPILE ) , )
PROC ?= $( shell uname -m)
e l s e
PROC = $( CROSS_PROC)
e n d i f
i f e q ( $( PROC ) , x 8 6 _ 6 4 )
# You must have GCC 3.4 to use k8, otherwise use athlon
PROC = k8
#PROC=athlon
OPTIONS += -m64
e n d i f
i f e q ( $( PROC ) , s p a r c 6 4 )
#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
e n d i f
i f e q ( $( PROC ) , a r m )
# The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
i f e q ( $( SUB_PROC ) , m a v e r i c k )
OPTIONS += -fsigned-char -mcpu= ep9312
e l s e
i f e q ( $( SUB_PROC ) , x s c a l e )
OPTIONS += -fsigned-char -msoft-float -mcpu= xscale
e l s e
OPTIONS += -fsigned-char -msoft-float
e n d i f
e n d i f
e n d i f
MPG123TARG = linux
e n d i f
i f e q ( $( findstring BSD ,$ {OSARCH }) , B S D )
PROC = $( shell uname -m)
e n d i f
# Pentium Pro Optimize
#PROC=i686
# Pentium & VIA processors optimize
#PROC=i586
#PROC=k6
#PROC=ppc
PWD = $( shell pwd )
GREP = grep
i f e q ( $ { O S A R C H } , S u n O S )
GREP = /usr/xpg4/bin/grep
M4 = /usr/local/bin/m4
e n d i f
######### More GSM codec optimization
######### Uncomment to enable MMXTM optimizations for x86 architecture CPU's
######### which support MMX instructions. This should be newer pentiums,
@ -167,8 +101,90 @@ ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
MODULES_DIR = $( ASTLIBDIR) /modules
AGI_DIR = $( ASTVARLIBDIR) /agi-bin
# Pentium Pro Optimize
#PROC=i686
# Pentium & VIA processors optimize
#PROC=i586
#PROC=k6
#PROC=ppc
#Uncomment this to use the older DSP routines
#CFLAGS+=-DOLD_DSP_ROUTINES
# Determine by a grep 'DocumentRoot' of your httpd.conf file
HTTP_DOCSDIR = /var/www/html
# Determine by a grep 'ScriptAlias' of your httpd.conf file
HTTP_CGIDIR = /var/www/cgi-bin
# 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.
i f n e q ( $( wildcard ~/.asterisk .makeopts ) , )
i n c l u d e ~ / . a s t e r i s k . m a k e o p t s
e n d i f
i f e q ( $( CROSS_COMPILE ) , )
OSARCH = $( shell uname -s)
e l s e
OSARCH = $( CROSS_ARCH)
e n d i f
i f e q ( $ { O S A R C H } , L i n u x )
i f e q ( $( CROSS_COMPILE ) , )
PROC ?= $( shell uname -m)
e l s e
PROC = $( CROSS_PROC)
e n d i f
i f e q ( $( PROC ) , x 8 6 _ 6 4 )
# You must have GCC 3.4 to use k8, otherwise use athlon
PROC = k8
#PROC=athlon
OPTIONS += -m64
e n d i f
i f e q ( $( PROC ) , s p a r c 6 4 )
#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
e n d i f
i f e q ( $( PROC ) , a r m )
# The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
i f e q ( $( SUB_PROC ) , m a v e r i c k )
OPTIONS += -fsigned-char -mcpu= ep9312
e l s e
i f e q ( $( SUB_PROC ) , x s c a l e )
OPTIONS += -fsigned-char -msoft-float -mcpu= xscale
e l s e
OPTIONS += -fsigned-char -msoft-float
e n d i f
e n d i f
e n d i f
MPG123TARG = linux
e n d i f
i f e q ( $( findstring BSD ,$ {OSARCH }) , B S D )
PROC = $( shell uname -m)
e n d i f
PWD = $( shell pwd )
GREP = grep
i f e q ( $ { O S A R C H } , S u n O S )
GREP = /usr/xpg4/bin/grep
M4 = /usr/local/bin/m4
e n d i f
INCLUDE = -Iinclude -I../include
CFLAGS = -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $( DEBUG) $( INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
CFLAGS + =-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $( DEBUG) $( INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
CFLAGS += $( OPTIMIZE)
i f n e q ( $( PROC ) , u l t r a s p a r c )
@ -203,9 +219,6 @@ CFLAGS+=-Wcast-align -DSOLARIS
INCLUDE += -Iinclude/solaris-compat -I$( CROSS_COMPILE_TARGET) /usr/local/ssl/include
e n d i f
#Uncomment this to use the older DSP routines
#CFLAGS+=-DOLD_DSP_ROUTINES
CFLAGS += $( shell if [ -f $( CROSS_COMPILE_TARGET) /usr/include/linux/zaptel.h ] ; then echo "-DZAPTEL_OPTIMIZATIONS" ; fi )
CFLAGS += $( shell if [ -f $( CROSS_COMPILE_TARGET) /usr/local/include/zaptel.h ] ; then echo "-DZAPTEL_OPTIMIZATIONS" ; fi )
@ -215,10 +228,6 @@ ASTERISKVERSION=$(shell if [ -f .version ]; then cat .version; else if [ -d CVS
ASTERISKVERSIONNUM = $( shell if [ -d CVS ] ; then echo 999999 ; else if [ -f .version ] ; then awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version ; else echo 000000 ; fi ; fi )
# Set the following two variables to match your httpd installation.
# Determine by a grep 'DocumentRoot' of your httpd.conf file
HTTP_DOCSDIR = /var/www/html
# Determine by a grep 'ScriptAlias' of your httpd.conf file
HTTP_CGIDIR = /var/www/cgi-bin
RPMVERSION = $( shell if [ -f .version ] ; then sed 's/[-\/:]/_/g' .version; else echo "unknown" ; fi )
CFLAGS += $( DEBUG_THREADS)