File atl1e-2.6.25.diff of Package atl1e

--- src/Makefile.orig	2008-07-15 20:41:02.000000000 +0200
+++ src/Makefile	2008-07-15 20:41:59.000000000 +0200
@@ -72,7 +72,7 @@
 ifneq (,$(wildcard /boot/vmlinuz.version.h))
   VERSION_FILE := /boot/vmlinuz.version.h
   CONFIG_FILE  := /boot/vmlinuz.autoconf.h
-  KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | \
+  KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | \
           grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
   ifeq ($(KVER),$(shell uname -r))
     # set up include path to override headers from kernel source
@@ -80,7 +80,7 @@
     x:=$(shell mkdir -p include/linux)
     x:=$(shell cp /boot/vmlinuz.version.h include/linux/version.h)
     x:=$(shell cp /boot/vmlinuz.autoconf.h include/linux/autoconf.h)
-    CFLAGS += -I./include
+    EXTRA_CFLAGS += -I./include
   else
     ifneq (,$(wildcard $(KOBJ)/include/linux/utsrelease.h))
       VERSION_FILE := $(KOBJ)/include/linux/utsrelease.h
@@ -123,38 +123,38 @@
 # some additional features are only built on Intel platforms
 ARCH := $(shell uname -m | sed 's/i.86/i386/')
 ifeq ($(ARCH),alpha)
-  CFLAGS += -ffixed-8 -mno-fp-regs
+  EXTRA_CFLAGS += -ffixed-8 -mno-fp-regs
 endif
 ifeq ($(ARCH),x86_64)
-  CFLAGS += -mcmodel=kernel -mno-red-zone
+  EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone
 endif
 ifeq ($(ARCH),ppc)
-  CFLAGS += -msoft-float
+  EXTRA_CFLAGS += -msoft-float
 endif
 ifeq ($(ARCH),ppc64)
-  CFLAGS += -m64 -msoft-float
+  EXTRA_CFLAGS += -m64 -msoft-float
   LDFLAGS += -melf64ppc
 endif
 
 # standard flags for module builds
-CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -DDBG=0
-CFLAGS += -I$(KSRC)/include -I.
-CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
+EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -DDBG=0
+EXTRA_CFLAGS += -I$(KSRC)/include -I.
+EXTRA_CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
             echo "-DMODVERSIONS -DEXPORT_SYMTAB \
                   -include $(KSRC)/include/linux/modversions.h")
 
-CFLAGS += $(CFLAGS_EXTRA)
+EXTRA_CFLAGS += $(CFLAGS_EXTRA)
 
 RHC := $(KSRC)/include/linux/rhconfig.h
 ifneq (,$(wildcard $(RHC)))
   # 7.3 typo in rhconfig.h
-  ifneq (,$(shell $(CC) $(CFLAGS) -E -dM $(RHC) | grep __module__bigmem))
-	CFLAGS += -D__module_bigmem
+  ifneq (,$(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(RHC) | grep __module__bigmem))
+	EXTRA_CFLAGS += -D__module_bigmem
   endif
 endif
 
 # get the kernel version - we use this to find the correct install path
-KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \
+KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \
         awk '{ print $$3 }' | sed 's/\"//g')
 
 # assume source symlink is the same as build, otherwise adjust KOBJ
@@ -175,7 +175,7 @@
 INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net/atl1e
 
 # look for SMP in config.h
-SMP := $(shell $(CC) $(CFLAGS) -E -dM $(CONFIG_FILE) | \
+SMP := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(CONFIG_FILE) | \
          grep -w CONFIG_SMP | awk '{ print $$3 }')
 ifneq ($(SMP),1)
   SMP := 0
@@ -196,7 +196,7 @@
 endif
 
 ifeq ($(SMP),1)
-  CFLAGS += -D__SMP__
+  EXTRA_CFLAGS += -D__SMP__
 endif
 
 ###########################################################################
@@ -237,12 +237,12 @@
 
 # Get rid of compile warnings in kernel header files from SuSE
 ifneq (,$(wildcard /etc/SuSE-release))
-  CFLAGS += -Wno-sign-compare -fno-strict-aliasing
+  EXTRA_CFLAGS += -Wno-sign-compare -fno-strict-aliasing
 endif
 
 # Get rid of compile warnings in kernel header files from fedora
 ifneq (,$(wildcard /etc/fedora-release))
-  CFLAGS += -fno-strict-aliasing
+  EXTRA_CFLAGS += -fno-strict-aliasing
 endif
 
 .SILENT: $(TARGET)
--- src/Makefile.orig	2008-07-23 02:36:10.000000000 +0200
+++ src/Makefile	2008-07-23 02:36:29.000000000 +0200
@@ -34,78 +34,6 @@
 BUILD_KERNEL=$(shell uname -r)
 endif
 
-###########################################################################
-# Environment tests
-
-# Kernel Search Path
-# All the places we look for kernel source
-KSP :=  /lib/modules/$(BUILD_KERNEL)/build \
-        /lib/modules/$(BUILD_KERNEL)/source \
-        /usr/src/linux-$(BUILD_KERNEL) \
-        /usr/src/linux-$($(BUILD_KERNEL) | sed 's/-.*//') \
-        /usr/src/kernel-headers-$(BUILD_KERNEL) \
-        /usr/src/kernel-source-$(BUILD_KERNEL) \
-        /usr/src/linux-$($(BUILD_KERNEL) | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \
-        /usr/src/linux
-
-# prune the list down to only values that exist
-# and have an include/linux sub-directory
-test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
-KSP := $(foreach dir, $(KSP), $(test_dir))
-
-# we will use this first valid entry in the search path
-ifeq (,$(KSRC))
-  KSRC := $(firstword $(KSP))
-endif
-
-ifeq (,$(KSRC))
-  $(error Linux kernel source not found)
-else
-ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
-  KOBJ :=  /lib/modules/$(shell uname -r)/build
-else
-  KOBJ :=  $(KSRC)
-endif
-endif
-
-# check for version.h and autoconf.h for running kernel in /boot (SUSE)
-ifneq (,$(wildcard /boot/vmlinuz.version.h))
-  VERSION_FILE := /boot/vmlinuz.version.h
-  CONFIG_FILE  := /boot/vmlinuz.autoconf.h
-  KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | \
-          grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
-  ifeq ($(KVER),$(shell uname -r))
-    # set up include path to override headers from kernel source
-    x:=$(shell rm -rf include)
-    x:=$(shell mkdir -p include/linux)
-    x:=$(shell cp /boot/vmlinuz.version.h include/linux/version.h)
-    x:=$(shell cp /boot/vmlinuz.autoconf.h include/linux/autoconf.h)
-    EXTRA_CFLAGS += -I./include
-  else
-    ifneq (,$(wildcard $(KOBJ)/include/linux/utsrelease.h))
-      VERSION_FILE := $(KOBJ)/include/linux/utsrelease.h
-    else
-      VERSION_FILE := $(KOBJ)/include/linux/version.h
-    endif
-    CONFIG_FILE  := $(KSRC)/include/linux/autoconf.h
-  endif
-else
-  ifneq (,$(wildcard $(KOBJ)/include/linux/utsrelease.h))
-    VERSION_FILE := $(KOBJ)/include/linux/utsrelease.h
-  else
-    VERSION_FILE := $(KOBJ)/include/linux/version.h
-  endif
-  CONFIG_FILE  := $(KSRC)/include/linux/autoconf.h
-endif
-
-ifeq (,$(wildcard $(VERSION_FILE)))
-  $(error Linux kernel source not configured - missing version.h)
-endif
-
-ifeq (,$(wildcard $(CONFIG_FILE)))
-  $(error Linux kernel source not configured - missing autoconf.h)
-endif
-
 # pick a compiler
 ifneq (,$(findstring egcs-2.91.66, $(shell cat /proc/version)))
   CC := kgcc gcc cc
--- src/Makefile.orig	2008-07-23 02:38:11.000000000 +0200
+++ src/Makefile	2008-07-23 02:38:52.000000000 +0200
@@ -85,20 +85,6 @@
 KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \
         awk '{ print $$3 }' | sed 's/\"//g')
 
-# assume source symlink is the same as build, otherwise adjust KOBJ
-ifneq (,$(wildcard /lib/modules/$(KVER)/build))
-ifneq ($(KSRC),$(shell cd /lib/modules/$(KVER)/build ; pwd -P))
-  KOBJ=/lib/modules/$(KVER)/build
-endif
-endif
-
-KKVER := $(shell echo $(KVER) | \
-         awk '{ if ($$0 ~ /2\.[4-9]\./) print "1"; else print "0"}')
-ifeq ($(KKVER), 0)
-  $(error *** Aborting the build. \
-          *** This driver is not supported on kernel versions older than 2.4.0)
-endif
-
 # set the install path
 INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net/atl1e
 
--- src/Makefile.orig	2008-07-23 02:40:13.000000000 +0200
+++ src/Makefile	2008-07-23 02:41:04.000000000 +0200
@@ -81,38 +81,6 @@
   endif
 endif
 
-# get the kernel version - we use this to find the correct install path
-KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \
-        awk '{ print $$3 }' | sed 's/\"//g')
-
-# set the install path
-INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net/atl1e
-
-# look for SMP in config.h
-SMP := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(CONFIG_FILE) | \
-         grep -w CONFIG_SMP | awk '{ print $$3 }')
-ifneq ($(SMP),1)
-  SMP := 0
-endif
-
-ifneq ($(SMP),$(shell uname -a | grep SMP > /dev/null 2>&1 && echo 1 || echo 0))
-  $(warning ***)
-  ifeq ($(SMP),1)
-    $(warning *** Warning: kernel source configuration (SMP))
-    $(warning *** does not match running kernel (UP))
-  else
-    $(warning *** Warning: kernel source configuration (UP))
-    $(warning *** does not match running kernel (SMP))
-  endif
-  $(warning *** Continuing with build,)
-  $(warning *** resulting driver may not be what you want)
-  $(warning ***)
-endif
-
-ifeq ($(SMP),1)
-  EXTRA_CFLAGS += -D__SMP__
-endif
-
 ###########################################################################
 # 2.4.x & 2.6.x Specific rules
 
openSUSE Build Service is sponsored by