1 ifeq ($(KERNELRELEASE),)
  2 CURRENT_PATH=$(shell pwd)
  3 #KERNEL_DIR:=/lib/modules/$(shell uname -r)/build/
  4 KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
  5 default:
  6     make -C $(KERNEL_DIR) M=$(CURRENT_PATH) modules
  7 install:
  8     insmod hello.ko
  9 uninstall:
 10     rmmod hello.ko
 11 clean:
 12     make -C  $(KERNEL_DIR) M=$(CURRENT_PATH) clean
 13 else
 14     modules-objs:=hello.o
 15     obj-m:=hello.o
 16 endif

相关文章:

  • 2022-03-11
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2021-05-25
  • 2021-08-21
  • 2022-01-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-06-27
  • 2022-02-07
  • 2021-05-19
相关资源
相似解决方案