mirror of
https://github.com/dynup/kpatch
synced 2024-12-13 00:44:34 +00:00
344050d8d3
Long ago, the kpatch_trampoline required being written in assembler, but that's no longer needed now that it integrates nicely with ftrace. Move it to a C function and rename it kpatch_ftrace_handler.
24 lines
521 B
Makefile
24 lines
521 B
Makefile
# make rules
|
|
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
|
THISDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
ifeq ($(wildcard $(KPATCH_BUILD)),)
|
|
$(error $(KPATCH_BUILD) doesn\'t exist. Try installing the kernel-devel-$(shell uname -r) RPM.)
|
|
endif
|
|
|
|
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(THISDIR)
|
|
|
|
kpatch.ko: core.c
|
|
$(KPATCH_MAKE) kpatch.ko
|
|
|
|
all: kpatch.ko
|
|
|
|
clean:
|
|
$(RM) -Rf .*.o.cmd .*.ko.cmd .tmp_versions *.o *.ko *.mod.c \
|
|
Module.symvers
|
|
|
|
|
|
# kbuild rules
|
|
obj-m := kpatch.o
|
|
kpatch-y := core.o
|