diff options
Diffstat (limited to 'datapath/linux-2.6/Makefile.main.in')
-rw-r--r-- | datapath/linux-2.6/Makefile.main.in | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/datapath/linux-2.6/Makefile.main.in b/datapath/linux-2.6/Makefile.main.in new file mode 100644 index 000000000..0005ec4fa --- /dev/null +++ b/datapath/linux-2.6/Makefile.main.in @@ -0,0 +1,82 @@ +# -*- makefile -*- +export builddir = @abs_builddir@ +export srcdir = @abs_srcdir@ +export top_srcdir = @abs_top_srcdir@ +export KSRC = @KSRC26@ +export VERSION = @VERSION@ +export BUILD_VETH = @BUILD_VETH@ + +include $(srcdir)/../Modules.mk +include $(srcdir)/Modules.mk + +default: $(build_links) + +$(foreach s,$(sort $(foreach m,$(build_modules),$($(m)_sources))), \ + $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) $@)) + +distclean: clean + rm -f kcompat.h +distdir: clean +install: +all: default +check: all +clean: + rm -f *.o *.ko *_mod.* Module.symvers *.cmd kcompat.h.new + for d in $(build_links); do if test -h $$d; then rm $$d; fi; done + +ifneq ($(KSRC),) + +ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC)) + KOBJ := /lib/modules/$(shell uname -r)/build +else + KOBJ := $(KSRC) +endif + +ifneq ($(shell grep -c 'PATCHLEVEL = 6' $(KSRC)/Makefile),1) + $(error Linux kernel source in $(KSRC) not 2.6) +endif + +VERSION_FILE := $(KOBJ)/include/linux/version.h +ifeq (,$(wildcard $(VERSION_FILE))) + $(error Linux kernel source not configured - missing version.h) +endif + +CONFIG_FILE := $(KSRC)/include/linux/autoconf.h +ifeq (,$(wildcard $(CONFIG_FILE))) + $(error Linux kernel source not configured - missing autoconf.h) +endif + +default: + $(MAKE) -C $(KSRC) M=$(builddir) modules +endif + +# Much of the kernel build system in this file is derived from Intel's +# e1000 distribution, with the following license: + +################################################################################ +# +# Intel PRO/1000 Linux driver +# Copyright(c) 1999 - 2007, 2009 Intel Corporation. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". +# +# Contact Information: +# Linux NICS <linux.nics@intel.com> +# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> +# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 +# +################################################################################ |