# -*- makefile -*-
export builddir = /scrap/jenkins_master_workspace/workspace/MLNX_OFED/Releases/jobs/Build_OFED_internal/tmp_build_dir/builder_13805_daemon/openvswitch_build/openvswitch/datapath/linux
export srcdir = /scrap/jenkins_master_workspace/workspace/MLNX_OFED/Releases/jobs/Build_OFED_internal/tmp_build_dir/builder_13805_daemon/openvswitch_build/openvswitch/datapath/linux
export top_srcdir = /scrap/jenkins_master_workspace/workspace/MLNX_OFED/Releases/jobs/Build_OFED_internal/tmp_build_dir/builder_13805_daemon/openvswitch_build/openvswitch
export VERSION = 2.17.8

include $(srcdir)/../Modules.mk
include $(srcdir)/Modules.mk

ccflags-y := -DVERSION=\"$(VERSION)\"
ccflags-y += -I$(srcdir)/..
ccflags-y += -I$(builddir)/..
ccflags-y += -g
ccflags-y += -include $(builddir)/kcompat.h

# 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 += -include $(builddir)/kcompat.h -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include

obj-m := $(subst _,-,$(patsubst %,%.o,$(build_modules)))

define module_template
$(1)-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
endef

$(foreach module,$(build_multi_modules),$(eval $(call module_template,$(module))))
