Makefile 441 B

1234567891011121314151617
  1. obj-m := prcd.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. $(shell ./gen-header.sh)
  9. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
  10. install:
  11. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
  12. $(DEPMOD) -ae -F $(SYSMAP)
  13. clean:
  14. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean