#if KERNELRELEASE is defined, we've been invoked from the
#kernel build system and can use its language.

###ifneq ($(KERNELRELEASE),)
###
####include $(M)/make_1mod
###include $(M)/make_2mod
###
####Otherwise we were called directly from the command
####line; invoke the kernel build system.
###
###else

EXTRA_CFLAGS = -DSPLIT_MODULE

KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)


obj-m := ctr.o
ctr-y := ctr_stub.o ctredirect.o
clean-files := *.o *.ko *.mod.[co]

default:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean

#endif

