Files
openflow/datapath/linux-2.6/Kbuild.in
T
Justin Pettit 94f287969d Add support for Source-NAT to Linux 2.6 datapaths.
To enable SNAT, run configure with the "--enable-snat" flag.  This has
only been tested with the 2.6.23 kernel...more diverse testing will follow.
Documentation and a cleaner build setup will also be in a future check-in.
2008-10-11 00:30:02 -07:00

29 lines
878 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 += @SUPPORT_SNAT@
# 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))))