configure: Remove "26" from Linux variable names.
[sliver-openvswitch.git] / datapath / linux-2.6 / Makefile.main.in
1 # -*- makefile -*-
2 export builddir = @abs_builddir@
3 export srcdir = @abs_srcdir@
4 export top_srcdir = @abs_top_srcdir@
5 export KSRC = @KBUILD@
6 export VERSION = @VERSION@
7
8 include $(srcdir)/../Modules.mk
9 include $(srcdir)/Modules.mk
10
11 default: $(build_links)
12
13 $(foreach s,$(sort $(foreach m,$(build_modules),$($(m)_sources))), \
14   $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) $@))
15
16 distclean: clean
17         rm -f kcompat.h
18 distdir: clean
19 install:
20 all: default
21 check: all
22 clean:
23         rm -f *.o *.ko *_mod.* Module.symvers *.cmd kcompat.h.new
24         for d in $(build_links); do if test -h $$d; then rm $$d; fi; done
25
26 ifneq ($(KSRC),)
27
28 ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
29   KOBJ := /lib/modules/$(shell uname -r)/build
30 else
31   KOBJ := $(KSRC)
32 endif
33
34 ifneq ($(shell grep -c 'PATCHLEVEL = 6' $(KSRC)/Makefile),1)
35   $(error Linux kernel source in $(KSRC) not 2.6)
36 endif
37
38 VERSION_FILE := $(KOBJ)/include/linux/version.h
39 ifeq (,$(wildcard $(VERSION_FILE)))
40   $(error Linux kernel source not configured - missing version.h)
41 endif
42
43 CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
44 ifeq (,$(wildcard $(CONFIG_FILE)))
45   CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
46   ifeq (,$(wildcard $(CONFIG_FILE)))
47     $(error Linux kernel source not configured - missing autoconf.h)
48   endif
49 endif
50
51 default:
52         $(MAKE) -C $(KSRC) M=$(builddir) modules
53
54 modules_install:
55         $(MAKE) -C $(KSRC) M=$(builddir) modules_install
56 endif
57
58 # Much of the kernel build system in this file is derived from Intel's
59 # e1000 distribution, with the following license:
60
61 ################################################################################
62 #
63 # Intel PRO/1000 Linux driver
64 # Copyright(c) 1999 - 2007, 2009 Intel Corporation.
65 #
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.
69 #
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
73 # more details.
74 #
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.
78 #
79 # The full GNU General Public License is included in this distribution in
80 # the file called "COPYING".
81 #
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
86 #
87 ################################################################################