Files
openflow/datapath/linux-2.6/Kbuild.in
T
David Erickson 23b028c833 Added the base directory of the hardware table modules to the include path for compilation.
Renamed the base directory of a hardware table module from hwtable-* to hwtable_* to alleviate
the KBUILD_NODNAME string munging that occurs during compilation which changes all -'s to _'s
causing the bug that when you load the kernel module then try to remove it with the same
filename, it will fail.
2008-06-21 18:26:25 -07:00

29 lines
883 B
Makefile

# -*- makefile -*-
export builddir = @abs_builddir@
export srcdir = @abs_srcdir@
export top_srcdir = @abs_top_srcdir@
export VERSION = @VERSION@
include $(srcdir)/../Modules.mk
include $(srcdir)/Modules.mk
include @HW_TABLES@
EXTRA_CFLAGS := -DVERSION=\"$(VERSION)\"
EXTRA_CFLAGS += -I$(srcdir)/..
EXTRA_CFLAGS += -I$(builddir)/..
EXTRA_CFLAGS += -I$(top_srcdir)/include
EXTRA_CFLAGS += @HW_TABLES_INCLUDE@
# These include directories have to go before -I$(KSRC)/include.
# NOSTDINC_FLAGS just happens to be a variable that goes in the
# right place, even though it's conceptually incorrect.
NOSTDINC_FLAGS += -I$(srcdir)/compat-2.6 -I$(srcdir)/compat-2.6/include
obj-m := $(patsubst %,%_mod.o,$(all_modules))
define module_template
$(1)_mod-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
endef
$(foreach module,$(all_modules),$(eval $(call module_template,$(module))))