mirror of
https://github.com/dynup/kpatch
synced 2024-12-28 08:12:01 +00:00
4f27b9ae31
Organize the files functionally: - kmod/core: core kmod source - kmod/patch: patch kmod source - kpatch: kpatch script - kpatch-build: kpatch build script and supporting tools - contrib: distro-related files
21 lines
526 B
Makefile
21 lines
526 B
Makefile
KPATCH_NAME ?= patch
|
|
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
|
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(PWD)
|
|
ccflags-y += -I$(KPATCH_BASEDIR)
|
|
|
|
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
|