Makefile 422 B

12345678910111213141516
  1. obj-m := fake-device.o
  2. KDIR := /lib/modules/$(shell uname -r)/build
  3. PWD := $(shell pwd)
  4. DEPMOD:=$(shell which depmod)
  5. # possible bug: maybe this will work only on debian based systems
  6. SYSMAP:= /boot/System.map-$(shell uname -r)
  7. default:
  8. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
  9. install:
  10. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
  11. $(DEPMOD) -ae -F $(SYSMAP)
  12. clean:
  13. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean