7
7
include $(srcdir)/../Modules.mk
8
8
include $(srcdir)/Modules.mk
10
EXTRA_CFLAGS := -DVERSION=\"$(VERSION)\"
11
EXTRA_CFLAGS += -I$(srcdir)/..
12
EXTRA_CFLAGS += -I$(builddir)/..
14
EXTRA_CFLAGS += -include $(builddir)/kcompat.h
10
ccflags-y := -DVERSION=\"$(VERSION)\"
11
ccflags-y += -I$(srcdir)/..
12
ccflags-y += -I$(builddir)/..
14
ccflags-y += -include $(builddir)/kcompat.h
16
16
# These include directories have to go before -I$(KSRC)/include.
17
17
# NOSTDINC_FLAGS just happens to be a variable that goes in the
18
18
# right place, even though it's conceptually incorrect.
19
19
NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include
21
obj-m := $(patsubst %,%.o,$(build_modules))
21
obj-m := $(subst _,-,$(patsubst %,%.o,$(build_modules)))
23
23
define module_template
24
24
$(1)-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
27
$(foreach module,$(build_modules),$(eval $(call module_template,$(module))))
27
$(foreach module,$(build_multi_modules),$(eval $(call module_template,$(module))))