mirror of
https://github.com/dynup/kpatch
synced 2024-12-23 13:42:09 +00:00
e9b9654602
In some cases when packaging it may not be useful to build kmod/core at package build time (for example if using DKMS). Add a parameter 'BUILDMOD' that when set to 'yes' will build kmod/core. Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
27 lines
527 B
Makefile
27 lines
527 B
Makefile
include ../Makefile.inc
|
|
|
|
all: clean
|
|
ifeq ($(BUILDMOD),yes)
|
|
$(MAKE) -C core
|
|
endif
|
|
|
|
install:
|
|
ifeq ($(BUILDMOD),yes)
|
|
$(INSTALL) -d $(MODULESDIR)/$(shell uname -r)
|
|
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(shell uname -r)
|
|
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(shell uname -r)
|
|
endif
|
|
$(INSTALL) -d $(DATADIR)/patch
|
|
$(INSTALL) -m 644 patch/* $(DATADIR)/patch
|
|
|
|
uninstall:
|
|
ifeq ($(BUILDMOD),yes)
|
|
$(RM) -R $(MODULESDIR)
|
|
endif
|
|
$(RM) -R $(DATADIR)
|
|
|
|
clean:
|
|
ifeq ($(BUILDMOD),yes)
|
|
$(MAKE) -C core clean
|
|
endif
|