2014-02-13 03:53:05 +00:00
|
|
|
KPATCH_NAME ?= patch
|
|
|
|
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
2014-01-28 17:23:24 +00:00
|
|
|
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(PWD)
|
2014-02-11 16:25:48 +00:00
|
|
|
|
2014-02-13 03:53:05 +00:00
|
|
|
obj-m += kpatch-$(KPATCH_NAME).o
|
2014-02-11 16:25:48 +00:00
|
|
|
|
2014-02-13 03:53:05 +00:00
|
|
|
kpatch-$(KPATCH_NAME)-objs += kpatch-patch-hook.o kpatch.lds output.o
|
2014-02-11 16:25:48 +00:00
|
|
|
|
2014-02-13 03:53:05 +00:00
|
|
|
all: kpatch-$(KPATCH_NAME).ko
|
2014-02-11 16:25:48 +00:00
|
|
|
|
2014-02-13 03:53:05 +00:00
|
|
|
kpatch-$(KPATCH_NAME).ko:
|
|
|
|
$(KPATCH_MAKE) kpatch-$(KPATCH_NAME).ko
|
2014-02-11 16:25:48 +00:00
|
|
|
|
|
|
|
kpatch-patch-hook.o: kpatch-patch-hook.c
|
|
|
|
$(KPATCH_MAKE) kpatch-patch-hook.o
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -Rf .*.o.cmd .*.ko.cmd .tmp_versions *.o *.ko *.mod.c \
|
|
|
|
Module.symvers
|