mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))


# obj-m specifie we're a kernel module.
obj-m += mbuf_test.o
mbuf_test-y := src/module.o

# Get the symvers of the mbuf module in the above directory, needs to have been built
KBUILD_EXTRA_SYMBOLS ?= $(mkfile_dir)/../Module.symvers


# Set the path to the Kernel build utils.
KBUILD=/lib/modules/$(shell uname -r)/build/
 
default:
	$(MAKE) -C $(KBUILD) M=$(PWD) modules

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

menuconfig:
	$(MAKE) -C $(KBUILD) M=$(PWD) menuconfig
