2014-02-13 16:04:35 +00:00
|
|
|
include ../Makefile.inc
|
2016-05-06 09:45:07 +00:00
|
|
|
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
|
|
|
KERNELRELEASE := $(lastword $(subst /, , $(dir $(KPATCH_BUILD))))
|
2014-02-13 16:04:35 +00:00
|
|
|
|
2014-03-27 04:26:31 +00:00
|
|
|
all: clean
|
2016-02-10 15:55:45 +00:00
|
|
|
ifeq ($(BUILDMOD),yes)
|
2014-02-18 04:37:07 +00:00
|
|
|
$(MAKE) -C core
|
2016-02-10 15:55:45 +00:00
|
|
|
endif
|
2014-02-13 16:04:35 +00:00
|
|
|
|
|
|
|
install:
|
2016-02-10 15:55:45 +00:00
|
|
|
ifeq ($(BUILDMOD),yes)
|
2016-05-06 09:45:07 +00:00
|
|
|
$(INSTALL) -d $(MODULESDIR)/$(KERNELRELEASE)
|
|
|
|
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(KERNELRELEASE)
|
|
|
|
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(KERNELRELEASE)
|
2016-02-10 15:55:45 +00:00
|
|
|
endif
|
2014-02-13 16:04:35 +00:00
|
|
|
$(INSTALL) -d $(DATADIR)/patch
|
|
|
|
$(INSTALL) -m 644 patch/* $(DATADIR)/patch
|
|
|
|
|
2014-03-20 14:29:06 +00:00
|
|
|
uninstall:
|
2016-02-10 15:55:45 +00:00
|
|
|
ifeq ($(BUILDMOD),yes)
|
2014-07-28 21:05:31 +00:00
|
|
|
$(RM) -R $(MODULESDIR)
|
2016-02-10 15:55:45 +00:00
|
|
|
endif
|
2014-03-20 14:29:06 +00:00
|
|
|
$(RM) -R $(DATADIR)
|
|
|
|
|
2014-02-13 16:04:35 +00:00
|
|
|
clean:
|
2016-02-10 15:55:45 +00:00
|
|
|
ifeq ($(BUILDMOD),yes)
|
2014-02-18 04:37:07 +00:00
|
|
|
$(MAKE) -C core clean
|
2016-02-10 15:55:45 +00:00
|
|
|
endif
|