29 lines
430 B
Makefile

obj-m += xpo_modul.o
all: build
build:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
load:
sudo insmod xpo_modul.ko
unload:
sudo rmmod xpo_modul
list:
sudo lsmod | grep xpo
msg:
sudo dmesg | grep xpo
start:
sudo watch -n 0.2 "cat /dev/xpo_modul"
restart: msg unload build load
zip:
zip naloga.zip Makefile xpo_modul.c xpo_modul.h