mirror of
https://github.com/dynup/kpatch
synced 2024-12-16 02:14:29 +00:00
8085d0402b
Build and install the kpatch core module with make and make install, rather than building it every time with kpatch build. The only downside to this approach is that the user has to make and make install kpatch every time they get a new kernel. But this is only temporary, until the kpatch module is delivered in an RPM.
20 lines
493 B
Makefile
20 lines
493 B
Makefile
KPATCH_NAME ?= patch
|
|
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
|
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(PWD)
|
|
|
|
obj-m += kpatch-$(KPATCH_NAME).o
|
|
|
|
kpatch-$(KPATCH_NAME)-objs += kpatch-patch-hook.o kpatch.lds output.o
|
|
|
|
all: kpatch-$(KPATCH_NAME).ko
|
|
|
|
kpatch-$(KPATCH_NAME).ko:
|
|
$(KPATCH_MAKE) kpatch-$(KPATCH_NAME).ko
|
|
|
|
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
|