# CellGuard kernel module
#
# Cross-compile against the rango (Pixel 10 Pro Fold, Tensor G5) kernel.
# Expects KDIR pointing at a prepared kernel tree (6.6.x).
#
#   export KDIR=/home/snake/RadioControl/build/rango-kernel
#   export CROSS_COMPILE=aarch64-linux-gnu-
#   export ARCH=arm64
#   make
#
# Output: cellguard.ko
#
# If KDIR is unset, falls back to the running kernel's build dir
# (only useful on a dev machine for sanity-compile).

obj-m += cellguard.o

KDIR ?= /lib/modules/$(shell uname -r)/build

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

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

install:
	@echo "Copy cellguard.ko to device then 'insmod cellguard.ko'"
