aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/gsm/Makefile
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-13 05:24:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-13 05:24:13 +0000
commitc964b7ebf61cd3fc330ccb86cd596be947f7a539 (patch)
tree55317371bddd607e4771b90fad170e4e6ca3ab5a /codecs/gsm/Makefile
parenta015aea84329727df146c25c65b7fc79b4d8181b (diff)
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
Diffstat (limited to 'codecs/gsm/Makefile')
-rw-r--r--codecs/gsm/Makefile62
1 files changed, 11 insertions, 51 deletions
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 \