Skip to content

Instantly share code, notes, and snippets.

@tuna-f1sh
Created August 23, 2022 09:54
Show Gist options
  • Save tuna-f1sh/4a98f3f8a7a4dd23b29941eecd67df0d to your computer and use it in GitHub Desktop.
Save tuna-f1sh/4a98f3f8a7a4dd23b29941eecd67df0d to your computer and use it in GitHub Desktop.
Module Makefile out of tree
obj-m += gs_usb.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
reload: gs_usb.ko
sudo rmmod gs_usb.ko
sudo insmod gs_usb.ko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment