configure: Remove --with-build-number.
[sliver-openvswitch.git] / datapath / linux / Kbuild.in
1 # -*- makefile -*-
2 export builddir = @abs_builddir@
3 export srcdir = @abs_srcdir@
4 export top_srcdir = @abs_top_srcdir@
5 export VERSION = @VERSION@
6
7 include $(srcdir)/../Modules.mk
8 include $(srcdir)/Modules.mk
9
10 EXTRA_CFLAGS := -DVERSION=\"$(VERSION)\"
11 EXTRA_CFLAGS += -I$(srcdir)/..
12 EXTRA_CFLAGS += -I$(builddir)/..
13 EXTRA_CFLAGS += -g
14 EXTRA_CFLAGS += -include $(builddir)/kcompat.h
15
16 # These include directories have to go before -I$(KSRC)/include.
17 # NOSTDINC_FLAGS just happens to be a variable that goes in the
18 # right place, even though it's conceptually incorrect.
19 NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include
20
21 obj-m := $(patsubst %,%.o,$(build_modules))
22
23 define module_template
24 $(1)-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
25 endef
26
27 $(foreach module,$(build_modules),$(eval $(call module_template,$(module))))