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
-CFLAGS+=$(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) -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
endif
#K6OPT = -DK6OPT
#Tell gcc to optimize the asterisk's code
-OPTIMIZE=-O6
+OPTIMIZE+=-O6
#Include debug symbols in the executables (-g) and profiling info (-pg)
DEBUG=-g #-pg
CFLAGS+=-fPIC
+PROC=$(shell uname -m)
OSARCH=$(shell uname -s)
+
ifeq (${OSARCH},FreeBSD)
SOLINK+=-L/usr/local/lib
endif
+#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
+ifeq ($(PROC),sparc64)
+PROC=ultrasparc
+CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+endif
+
#
# unixODBC stuff...
#
#
# Mark Spencer <markster@linux-support.net>
#
+# Edited By Belgarath <> Aug 28 2004
+# Added bare bones ultrasparc-linux support.
+#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
OSARCH=$(shell uname -s)
+PROC=$(shell uname -m)
USE_MYSQL_FRIENDS=0
USE_SIP_MYSQL_FRIENDS=0
PTLIB=-lpt_linux_x86_r
H323LIB=-lh323_linux_x86_r
CHANH323LIB=-ldl
+
+ifeq ($(PROC),sparc64)
+PROC=ultrasparc
+CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+endif
+
endif
ifeq (${OSARCH},FreeBSD)
PTLIB=-lpt_FreeBSD_x86_r
} else {
snprintf(invite, sizeof(invite), "sip:%s", p->tohost);
}
+ if (!ast_strlen_zero(p->extraparams)) {
+ strncat(invite, ";", sizeof(invite) - strlen(invite));
+ strncat(invite, p->extraparams, sizeof(invite) - strlen(invite));
+ }
strncpy(p->uri, invite, sizeof(p->uri) - 1);
/* If there is a VXML URL append it to the SIP URL */
if (vxml_url)
{
- if (strlen(p->extraparams))
- snprintf(to, sizeof(to), "<%s;%s>;%s", invite, p->extraparams, vxml_url);
- else
- snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
+ snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
}
else
{
- if (strlen(p->extraparams))
- snprintf(to, sizeof(to), "<%s;%s>", invite, p->extraparams);
- else
- snprintf(to, sizeof(to), "<%s>", invite);
+ snprintf(to, sizeof(to), "<%s>", invite);
}
memset(req, 0, sizeof(struct sip_request));
init_req(req, cmd, invite);
endif
endif
+#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
+ifeq (${PROC},ultrasparc)
+OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 -fomit-frame-pointer
+endif
+
PG =
#PG = -g -pg
######### Profiling flags. If you don't know what that means, leave it blank.
ifneq ($(PROC),ppc)
ifneq ($(PROC),x86_64)
ifneq ($(PROC),alpha)
+#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
ifeq ($(PROC),ultrasparc)
- CFLAGS+= -mtune=$(PROC)
+ CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
else
CFLAGS+= -march=$(PROC)
endif
else
SOVER=2
endif
+#Added support for UltraSparc - Belgarath
+ifeq ($(ARCH),sparc64)
+PROC=ultrasparc
+CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+endif
+
LIBDBSO=libdb.so.$(SOVER)
PROG= db_dump185
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \