summaryrefslogtreecommitdiff
path: root/Makefile.kernel26
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-09-22 08:07:27 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-09-22 08:07:27 +0000
commit6fab4f694d95e771ae9d0509f23c6ece179efa6f (patch)
treed8527b9bdb0c931db9be82c4a75764b784cc264e /Makefile.kernel26
parentdddf4218e96ea4d514f6c709a4493f644564f43c (diff)
Makefile Automatically enabling Zaptel MMX support. Disabled by default
for now. * To enable, build with ZAPTEL_MMX_AUTO=yes (or any other non-empty value) * There is a white list of configuration values (without the prefix CONFIG_). One of them needs to be set in order for CONFIG_ZAPTEL_MMX to be enabled. * Only adds support for kernel 2.6 . If anybody finds a simple way to do the same with 2.4 - patches are welcomes. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3076 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile.kernel26')
-rw-r--r--Makefile.kernel2621
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.kernel26 b/Makefile.kernel26
index 6af9a69..2833504 100644
--- a/Makefile.kernel26
+++ b/Makefile.kernel26
@@ -25,3 +25,24 @@ endif
EXTRA_CFLAGS += -DECHO_CAN_HPEC -I$(src)/hpec
endif
+
+
+# set CONFIG_ZAPTEL_MMX for a number of CPU types.
+# Right now this part is not enabled, unless you build with
+# ZAPTEL_MMX_AUTO=something .
+ZAPMMX_WHITELIST_i386 = M586MMX M686 MPENTIUMII MPENTIUMIII MPENTIUMM \
+ MPENTIUM4 MVIAC3_2
+
+ZAPMMX_WHITELIST_x86_64 =
+
+# A list of configuration variables to test: CONFIG_M686 , etc.
+ZAPMMX_CONFIG_VARS := $(ZAPMMX_WHITELIST_$(ARCH):%=CONFIG_%)
+
+# expand them:
+ZAPMMX_CONFIG_VALS := $(strip $(foreach var,$(ZAPMMX_CONFIG_VARS),$(var)) )
+ifneq (,$(ZAPTEL_MMX_AUTO))
+ ifneq (,$(ZAPMMX_CONFIG_VALS))
+ # TODO: make that
+ CFLAGS_zaptel-base.o += -DCONFIG_ZAPTEL_MMX
+ endif
+endif