292f312a |
1 | ifneq ($(KERNELRELEASE),) |
2 | obj-m += marker-loader.o |
3 | else |
4 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
5 | PWD := $(shell pwd) |
6 | KERNELRELEASE = $(shell cat $(KERNELDIR)/$(KBUILD_OUTPUT)/include/linux/version.h | sed -n 's/.*UTS_RELEASE.*\"\(.*\)\".*/\1/p') |
7 | ifneq ($(INSTALL_MOD_PATH),) |
8 | DEPMOD_OPT := -b $(INSTALL_MOD_PATH) |
9 | endif |
10 | |
11 | default: |
12 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules |
13 | |
14 | modules_install: |
15 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install |
16 | if [ -f $(KERNELDIR)/$(KBUILD_OUTPUT)/System.map ] ; then /sbin/depmod -ae -F $(KERNELDIR)/$(KBUILD_OUTPUT)/System.map $(DEPMOD_OPT) $(KERNELRELEASE) ; fi |
17 | |
18 | |
19 | clean: |
20 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean |
21 | endif |