|
Packit |
c71e3f |
include ../Makefile.inc
|
|
Packit |
c71e3f |
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
|
Packit |
c71e3f |
KERNELRELEASE := $(lastword $(subst /, , $(dir $(KPATCH_BUILD))))
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
all: clean
|
|
Packit |
c71e3f |
ifeq ($(BUILDMOD),yes)
|
|
Packit |
c71e3f |
$(MAKE) -C core
|
|
Packit |
c71e3f |
endif
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
install:
|
|
Packit |
c71e3f |
ifeq ($(BUILDMOD),yes)
|
|
Packit |
c71e3f |
$(INSTALL) -d $(MODULESDIR)/$(KERNELRELEASE)
|
|
Packit |
c71e3f |
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(KERNELRELEASE)
|
|
Packit |
c71e3f |
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(KERNELRELEASE)
|
|
Packit |
c71e3f |
endif
|
|
Packit |
c71e3f |
$(INSTALL) -d $(DATADIR)/patch
|
|
Packit |
c71e3f |
$(INSTALL) -m 644 patch/* $(DATADIR)/patch
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
uninstall:
|
|
Packit |
c71e3f |
ifeq ($(BUILDMOD),yes)
|
|
Packit |
c71e3f |
$(RM) -R $(MODULESDIR)
|
|
Packit |
c71e3f |
endif
|
|
Packit |
c71e3f |
$(RM) -R $(DATADIR)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
clean:
|
|
Packit |
c71e3f |
ifeq ($(BUILDMOD),yes)
|
|
Packit |
c71e3f |
$(MAKE) -C core clean
|
|
Packit |
c71e3f |
endif
|