# the ADDIDATAINCLUDE variable may hold the path to the addidata-specific include directory
ifeq ($(ADDIDATAINC),)
# include directory has not been specified. suppose we are located inside the Linux kernel source tree
ADDI_CFLAGS:=-I$(TOPDIR)/include/linux/addidata/
else
# use specified location
ADDI_CFLAGS:=-I$(ADDIDATAINC) -D_ADDI_NO_WIN32_COMPAT -Wall -Werror
endif

# Each configuration option enables a list of files.
obj-$(CONFIG_SAMPLE01)	+= ksample01.o
obj-$(CONFIG_SAMPLE02)	+= ksample02.o
obj-$(CONFIG_SAMPLE03)	+= ksample03.o
obj-$(CONFIG_SAMPLE04)	+= ksample04.o
obj-$(CONFIG_SAMPLE05)	+= ksample05.o
obj-$(CONFIG_SAMPLE06)	+= ksample06.o

# list of objects that make the module
sample01-objs := ksample01.o
sample02-objs := ksample02.o
sample03-objs := ksample03.o
sample04-objs := ksample04.o
sample05-objs := ksample05.o
sample06-objs := ksample06.o

# Kernel build flags: ccflags-y and ldflags-y were introduced in 2008 as the
# recommended approach. Some kernel 5.x versions already enforce these flags.
# For compatibility: kernels < 5 use EXTRA_CFLAGS, kernels >= 5 use ccflags-y/ldflags-y
ifeq ($(shell test $(VERSION) -lt 5; echo $$?),0)
EXTRA_CFLAGS+=$(ADDI_CFLAGS)
EXTRA_LDFLAGS+=$(ADDI_LDFLAGS)
else
ccflags-y :=$(ADDI_CFLAGS)
ldflags-y :=$(ADDI_LDFLAGS)
endif

# KERNEL 2.4 ------------------------------------------
ifeq ($(VERSION),2)
ifeq ($(PATCHLEVEL),4)

# The target object and module list name.
O_TARGET	:=

# Objects that export symbols.
export-objs	:=


# The global Rules.make.
include $(TOPDIR)/Rules.make

endif
endif

