openvswitch: Remove Linux bridge compatibility.
[sliver-openvswitch.git] / datapath / linux / 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 all: default
17 distdir: clean
18 install:
19 install-data:
20 install-exec:
21 uninstall:
22 install-dvi:
23 install-html:
24 install-info:
25 install-ps:
26 install-pdf:
27 installdirs:
28 check: all
29 installcheck:
30 mostlyclean:
31 clean:
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
34 distclean: clean
35         rm -f kcompat.h
36 maintainer-clean: distclean
37 dvi:
38 pdf:
39 ps:
40 info:
41 html:
42 tags:
43 TAGS:
44
45 ifneq ($(KSRC),)
46
47 ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
48   KOBJ := /lib/modules/$(shell uname -r)/build
49 else
50   KOBJ := $(KSRC)
51 endif
52
53 VERSION_FILE := $(KOBJ)/include/linux/version.h
54 ifeq (,$(wildcard $(VERSION_FILE)))
55   VERSION_FILE := $(KOBJ)/include/generated/uapi/linux/version.h
56   ifeq (,$(wildcard $(VERSION_FILE)))
57     $(error Linux kernel source not configured - missing version.h)
58   endif
59 endif
60
61 CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
62 ifeq (,$(wildcard $(CONFIG_FILE)))
63   CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
64   ifeq (,$(wildcard $(CONFIG_FILE)))
65     $(error Linux kernel source not configured - missing autoconf.h)
66   endif
67 endif
68
69 default:
70         $(MAKE) -C $(KSRC) M=$(builddir) modules
71
72 modules_install:
73         $(MAKE) -C $(KSRC) M=$(builddir) modules_install
74 endif
75
76 # Much of the kernel build system in this file is derived from Intel's
77 # e1000 distribution, with the following license:
78
79 ################################################################################
80 #
81 # Intel PRO/1000 Linux driver
82 # Copyright(c) 1999 - 2007, 2009 Intel Corporation.
83 #
84 # This program is free software; you can redistribute it and/or modify it
85 # under the terms and conditions of the GNU General Public License,
86 # version 2, as published by the Free Software Foundation.
87 #
88 # This program is distributed in the hope it will be useful, but WITHOUT
89 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
91 # more details.
92 #
93 # You should have received a copy of the GNU General Public License along with
94 # this program; if not, write to the Free Software Foundation, Inc.,
95 # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
96 #
97 # The full GNU General Public License is included in this distribution in
98 # the file called "COPYING".
99 #
100 # Contact Information:
101 # Linux NICS <linux.nics@intel.com>
102 # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
103 # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
104 #
105 ################################################################################