2 builddir = @abs_builddir@
4 top_srcdir = @abs_top_srcdir@
10 include $(srcdir)/../Modules.mk
11 include $(srcdir)/Modules.mk
14 # This is somewhat hacky. We want to include our compatibility headers before
15 # any header files in the kernel by the same name. Unfortunately, the only
16 # mechanism the kernel provides to add cflags is the EXTRA_CFLAGS variable,
17 # which gets inserted into the build command after the internal kernel CFLAGS.
18 # Since our stuff needs to come first, we override the variable.
19 OF_CFLAGS = -I$(srcdir)/compat-2.4/include \
20 -I$(srcdir)/compat-2.4/include-$(ARCH) \
21 -I$(srcdir)/compat-2.4 -I$(srcdir)/.. \
22 -I$(srcdir)/../../include \
23 -I$(builddir)/.. $(CFLAGS) \
24 -DVERSION=\"$(VERSION)\"
26 OF_CFLAGS += -DBUILDNR=\"\"
28 OF_CFLAGS += -DBUILDNR=\"+build$(BUILDNR)\"
30 override CFLAGS := $(OF_CFLAGS)
33 list-multi := $(patsubst %,%_mod.o,$(all_modules))
35 # Module objects that we can build
36 obj-m += $(list-multi)
40 $(1)_mod-objs = $$(patsubst %.c,%.o,$(notdir $($(1)_sources)))
42 $(foreach module,$(all_modules),$(eval $(call parts_template,$(module))))
44 # Objects that export symbols
45 export-objs = $(all_objects)
47 # Include the kernel's global Rules.make
48 include $(TOPDIR)/Rules.make
50 # Link rules for multi-part objects
52 $(1)_mod.o: $($(1)_mod-objs)
53 $(LD) -r -o $$@ $($(1)_mod-objs)
55 $(foreach module,$(all_modules),$(eval $(call link_template,$(module))))
57 # Build system rewrite May 2008: Bobby Holley <bh10@stanford.edu>
59 # A few bits and pieces of this file might be derived from Intel's e1000
60 # distribution, with the following license:
62 ################################################################################
64 # Intel PRO/1000 Linux driver
65 # Copyright(c) 1999 - 2007 Intel Corporation.
67 # This program is free software; you can redistribute it and/or modify it
68 # under the terms and conditions of the GNU General Public License,
69 # version 2, as published by the Free Software Foundation.
71 # This program is distributed in the hope it will be useful, but WITHOUT
72 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
76 # You should have received a copy of the GNU General Public License along with
77 # this program; if not, write to the Free Software Foundation, Inc.,
78 # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
80 # The full GNU General Public License is included in this distribution in
81 # the file called "COPYING".
83 # Contact Information:
84 # Linux NICS <linux.nics@intel.com>
85 # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
86 # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
88 ################################################################################