2 export builddir = @abs_builddir@
3 export srcdir = @abs_srcdir@
4 export top_srcdir = @abs_top_srcdir@
7 export VERSION = @VERSION@
9 include $(srcdir)/../Modules.mk
10 include $(srcdir)/Modules.mk
13 default: $(all_sources)
16 ln -s $(srcdir)/../$@ $@
25 rm -f $(all_objects) *.ko *_mod.* Module.symvers
26 rm -f `find . -name \*.cmd`
27 for d in $(all_sources); do \
28 if test -h $$d; then \
35 ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
36 KOBJ := /lib/modules/$(shell uname -r)/build
41 ifneq ($(shell grep -c 'PATCHLEVEL = 6' $(KSRC)/Makefile),1)
42 $(error Linux kernel source in $(KSRC) not 2.6)
45 VERSION_FILE := $(KOBJ)/include/linux/version.h
46 ifeq (,$(wildcard $(VERSION_FILE)))
47 $(error Linux kernel source not configured - missing version.h)
50 CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
51 ifeq (,$(wildcard $(CONFIG_FILE)))
52 $(error Linux kernel source not configured - missing autoconf.h)
56 $(MAKE) -C $(KSRC) M=$(builddir) modules
59 # Much of the kernel build system in this file is derived from Intel's
60 # e1000 distribution, with the following license:
62 ################################################################################
64 # Intel PRO/1000 Linux driver
65 # Copyright(c) 1999 - 2007 Intel Corporation.
67 # This program is free software; you can redistribute it and/or modify it
68 # under the terms and conditions of the GNU General Public License,
69 # version 2, as published by the Free Software Foundation.
71 # This program is distributed in the hope it will be useful, but WITHOUT
72 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
76 # You should have received a copy of the GNU General Public License along with
77 # this program; if not, write to the Free Software Foundation, Inc.,
78 # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
80 # The full GNU General Public License is included in this distribution in
81 # the file called "COPYING".
83 # Contact Information:
84 # Linux NICS <linux.nics@intel.com>
85 # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
86 # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
88 ################################################################################