Advertisement
Guest User

acpi_call: custom makefile for installing

a guest
Sep 25th, 2011
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.52 KB | None | 0 0
  1. # custom makefile for acpi_call
  2. ifneq ($(KERNELRELEASE),)
  3. obj-m   := acpi_call.o
  4.  
  5. else
  6. KDIR    := /lib/modules/$(shell uname -r)/build
  7. INST    := $(DESTDIR)/lib/modules/$(shell uname -r)/updates
  8. PWD := $(shell pwd)
  9.  
  10. default:
  11.     $(MAKE) -C $(KDIR)  M=$(PWD) modules
  12. install: default
  13.     [ -d $(INST) ] || mkdir $(INST)
  14.     cp acpi_call.ko $(INST)/
  15.     depmod -a
  16. uninstall:
  17.     rm -f $(INST)/acpi_call.ko
  18.     depmod -a
  19. load:
  20.     -sudo /sbin/rmmod acpi_call
  21.     sudo /sbin/insmod acpi_call.ko
  22.  
  23. endif
  24.  
  25. clean:
  26.     $(MAKE) -C $(KDIR) M=$(PWD) clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement