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