obj-m += allocTrace.o

.PHONY: default
default: allocTrace.ko

.PHONY: run
run: allocTrace.ko
	scp allocTraceStrip.ko root@minarch:/root/
	-ssh root@minarch rmmod allocTrace
	-ssh root@minarch insmod /root/allocTraceStrip.ko

allocTrace.ko: allocTrace.c allocTrace.h
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
	-rm allocTrace.mod
	-rm allocTrace.mod.c
	-rm allocTrace.mod.o
	-rm allocTrace.o
	-rm modules.order
	-rm Module.symvers

.PHONY: clean
clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
