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

# Set the path to the Kernel build utils.
KBUILD=/lib/modules/$(shell uname -r)/build/

obj-m += ex_requestor_km.o
ccflags-y := -std=gnu99 -Wno-declaration-after-statement -I$(mkfile_dir)/../include/ -I$(mkfile_dir)/../../include/ 

all:
	$(CC) -Wall -I$(mkfile_dir)/../include/  -I$(mkfile_dir)/../../include/ usp_mcast_socket_ex.c -o usp_mcast_socket_ex
	make -C $(KBUILD) M=$(PWD) modules

clean:
	rm -f usp_mcast_socket_ex
	make -C $(KBUILD) M=$(PWD) clean
