# Makefile for your Linux kernel module

# Define the name of your module
MODULE_NAME := uharden_control

# Define the source files for your module
SRC := uharden.o ebitmap.o hooks.o uhardenfs.o

# Specify the location of the kernel source tree
KERNEL_SRC := /lib/modules/$(shell uname -r)/build

ccflags-y += -I$(PWD)/include/

# Build your module
obj-m += $(MODULE_NAME).o
$(MODULE_NAME)-objs := $(SRC)

# Build rules
all:
	make -C $(KERNEL_SRC) M=$(PWD) modules

clean:
	rm -f uharden_control.ko $(SRC) modules.order  Module.symvers .*cmd uharden_control.mod.c uharden_control.mod.o uharden_control.o  
	rm -rf .tmp_versions

install:
	mkdir -pv ${DESTDIR}/var/uharden/
	install -v uharden_control.ko ${DESTDIR}/var/uharden
