mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Adjust Makefiles to support Ultrasparc architecture (thanks Belgarath) (bug #2319)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
9
Makefile
9
Makefile
@@ -26,6 +26,11 @@ PROC=k8
|
|||||||
#PROC=athlon
|
#PROC=athlon
|
||||||
OPTIONS+=-m64
|
OPTIONS+=-m64
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PROC),sparc64)
|
||||||
|
PROC=ultrasparc
|
||||||
|
CFLAGS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
@@ -116,7 +121,11 @@ AGI_DIR=$(ASTVARLIBDIR)/agi-bin
|
|||||||
INCLUDE=-Iinclude -I../include
|
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)
|
CFLAGS+=$(OPTIMIZE)
|
||||||
|
|
||||||
|
ifneq ($(PROC),ultrasparc)
|
||||||
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
|
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
|
||||||
CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
|
CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
|
||||||
|
|
||||||
|
@@ -39,6 +39,7 @@ WAV49 = -DWAV49
|
|||||||
|
|
||||||
ifneq (${OSARCH},Darwin)
|
ifneq (${OSARCH},Darwin)
|
||||||
ifneq (${PROC},x86_64)
|
ifneq (${PROC},x86_64)
|
||||||
|
ifneq (${PROC},ultrasparc)
|
||||||
ifneq ($(shell uname -m),ppc)
|
ifneq ($(shell uname -m),ppc)
|
||||||
ifneq ($(shell uname -m),alpha)
|
ifneq ($(shell uname -m),alpha)
|
||||||
OPTIMIZE+=-march=$(PROC)
|
OPTIMIZE+=-march=$(PROC)
|
||||||
@@ -46,6 +47,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
PG =
|
PG =
|
||||||
#PG = -g -pg
|
#PG = -g -pg
|
||||||
@@ -203,7 +205,9 @@ ifeq (${OSARCH},Linux)
|
|||||||
ifneq ($(shell uname -m),x86_64)
|
ifneq ($(shell uname -m),x86_64)
|
||||||
ifneq ($(shell uname -m),ppc)
|
ifneq ($(shell uname -m),ppc)
|
||||||
ifneq ($(shell uname -m),alpha)
|
ifneq ($(shell uname -m),alpha)
|
||||||
GSM_SOURCES+= $(SRC)/k6opt.s
|
ifneq ($(shell uname -m),sparc64)
|
||||||
|
GSM_SOURCES+= $(SRC)/k6opt.s
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -252,11 +256,14 @@ GSM_OBJECTS = $(SRC)/add.o \
|
|||||||
$(SRC)/gsm_option.o \
|
$(SRC)/gsm_option.o \
|
||||||
$(SRC)/short_term.o \
|
$(SRC)/short_term.o \
|
||||||
$(SRC)/table.o
|
$(SRC)/table.o
|
||||||
|
|
||||||
ifeq (${OSARCH},Linux)
|
ifeq (${OSARCH},Linux)
|
||||||
ifneq ($(shell uname -m), x86_64)
|
ifneq ($(shell uname -m), x86_64)
|
||||||
ifneq ($(shell uname -m), ppc)
|
ifneq ($(shell uname -m), ppc)
|
||||||
ifneq ($(shell uname -m), alpha)
|
ifneq ($(shell uname -m), alpha)
|
||||||
GSM_OBJECTS+= $(SRC)/k6opt.o
|
ifneq ($(shell uname -m), sparc64)
|
||||||
|
GSM_OBJECTS+= $(SRC)/k6opt.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@@ -25,13 +25,17 @@ WARNINGS = -Wall -Wno-comment -Wno-error
|
|||||||
CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
|
CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
|
||||||
#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
|
#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
|
||||||
|
|
||||||
#fix for PPC processors and ALPHA too
|
#fix for PPC processors and ALPHA, And UltraSparc too
|
||||||
ifneq ($(OSARCH),Darwin)
|
ifneq ($(OSARCH),Darwin)
|
||||||
ifneq ($(findstring BSD,${OSARCH}),BSD)
|
ifneq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
ifneq ($(PROC),ppc)
|
ifneq ($(PROC),ppc)
|
||||||
ifneq ($(PROC),x86_64)
|
ifneq ($(PROC),x86_64)
|
||||||
ifneq ($(PROC),alpha)
|
ifneq ($(PROC),alpha)
|
||||||
CFLAGS+= -march=$(PROC)
|
ifeq ($(PROC),ultrasparc)
|
||||||
|
CFLAGS+= -mtune=$(PROC)
|
||||||
|
else
|
||||||
|
CFLAGS+= -march=$(PROC)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user