2 export builddir = @abs_builddir@
3 export srcdir = @abs_srcdir@
4 export top_srcdir = @abs_top_srcdir@
6 export VERSION = @VERSION@
8 include $(srcdir)/../Modules.mk
9 include $(srcdir)/Modules.mk
11 default: $(build_links)
13 $(foreach s,$(sort $(foreach m,$(build_modules),$($(m)_sources))), \
14 $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) $@))
32 rm -f *.o *.ko *_mod.* Module.symvers *.cmd kcompat.h.new
33 for d in $(build_links); do if test -h $$d; then rm $$d; fi; done
36 maintainer-clean: distclean
47 ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
48 KOBJ := /lib/modules/$(shell uname -r)/build
53 VERSION_FILE := $(KOBJ)/include/linux/version.h
54 ifeq (,$(wildcard $(VERSION_FILE)))
55 $(error Linux kernel source not configured - missing version.h)
58 CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
59 ifeq (,$(wildcard $(CONFIG_FILE)))
60 CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
61 ifeq (,$(wildcard $(CONFIG_FILE)))
62 $(error Linux kernel source not configured - missing autoconf.h)
67 $(MAKE) -C $(KSRC) M=$(builddir) modules
70 $(MAKE) -C $(KSRC) M=$(builddir) modules_install
73 # Much of the kernel build system in this file is derived from Intel's
74 # e1000 distribution, with the following license:
76 ################################################################################
78 # Intel PRO/1000 Linux driver
79 # Copyright(c) 1999 - 2007, 2009 Intel Corporation.
81 # This program is free software; you can redistribute it and/or modify it
82 # under the terms and conditions of the GNU General Public License,
83 # version 2, as published by the Free Software Foundation.
85 # This program is distributed in the hope it will be useful, but WITHOUT
86 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
87 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
90 # You should have received a copy of the GNU General Public License along with
91 # this program; if not, write to the Free Software Foundation, Inc.,
92 # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
94 # The full GNU General Public License is included in this distribution in
95 # the file called "COPYING".
97 # Contact Information:
98 # Linux NICS <linux.nics@intel.com>
99 # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
100 # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
102 ################################################################################