From c964b7ebf61cd3fc330ccb86cd596be947f7a539 Mon Sep 17 00:00:00 2001 From: tilghman Date: Mon, 13 Mar 2006 05:24:13 +0000 Subject: Bug 6709 - Simplify extensive embedded ifneq logic (and fix missing endif's) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12714 f38db490-d61c-443f-a65b-d21fe96a405b --- codecs/gsm/Makefile | 62 ++++++++++------------------------------------------- 1 file changed, 11 insertions(+), 51 deletions(-) (limited to 'codecs') diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index f162b141b..29b714cb9 100644 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -37,33 +37,13 @@ WAV49 = -DWAV49 ######### ppro's, etc, as well as the AMD K6 and K7. The compile will ######### probably require gcc. -ifneq (${OSARCH},Darwin) -ifneq (${OSARCH},SunOS) -ifneq (${PROC},x86_64) -ifneq (${PROC},ultrasparc) -ifneq ($(shell uname -m),ppc) -ifneq ($(shell uname -m),ppc64) -ifneq ($(shell uname -m),alpha) -ifneq ($(shell uname -m),armv4l) -ifneq (${PROC},sparc64) -ifneq (${PROC},arm) -ifneq (${PROC},ppc) -ifneq (${PROC},ppc64) -ifneq (${PROC},ia64) +ifeq (, $(findstring $(OSARCH) , Darwin SunOS )) +ifeq (, $(findstring $(PROC) , x86_64 ultrasparc sparc64 arm ppc ppc64 ia64 )) +ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l )) OPTIMIZE+=-march=$(PROC) endif endif endif -endif -endif -endif -endif -endif -endif -endif -endif -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. @@ -230,26 +210,17 @@ GSM_SOURCES = $(SRC)/add.c \ $(SRC)/gsm_option.c \ $(SRC)/short_term.c \ $(SRC)/table.c + +# add k6-specific code only if not on a non-k6 hardware or proc. +# XXX Keep a space after each findstring argument +# XXX should merge with GSM_OBJECTS ifeq (${OSARCH},Linux) -ifneq ($(shell uname -m),x86_64) -ifneq ($(shell uname -m),ppc) -ifneq ($(shell uname -m),ppc64) -ifneq ($(shell uname -m),alpha) -ifneq ($(shell uname -m),armv4l) -ifneq ($(shell uname -m),sparc64) -ifneq (${PROC},arm) -ifneq (${PROC},ia64) -ifneq ($(shell uname -m), parisc) +ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc )) +ifeq (,$(findstring ${PROC} , arm ia64 )) GSM_SOURCES+= $(SRC)/k6opt.s endif endif endif -endif -endif -endif -endif -endif -endif TOAST_SOURCES = $(SRC)/toast.c \ $(SRC)/toast_lin.c \ @@ -296,23 +267,12 @@ GSM_OBJECTS = $(SRC)/add.o \ $(SRC)/table.o ifeq (${OSARCH},Linux) -ifneq ($(shell uname -m), x86_64) -ifneq ($(shell uname -m), ppc) -ifneq ($(shell uname -m), ppc64) -ifneq ($(shell uname -m), alpha) -ifneq ($(shell uname -m), sparc64) -ifneq ($(shell uname -m), armv4l) -ifneq (${PROC},ia64) -ifneq ($(shell uname -m), parisc) +ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc )) +ifeq (,$(findstring ${PROC} , arm ia64 )) GSM_OBJECTS+= $(SRC)/k6opt.o endif endif endif -endif -endif -endif -endif -endif TOAST_OBJECTS = $(SRC)/toast.o \ $(SRC)/toast_lin.o \ -- cgit v1.2.3