|
Packit |
c71e3f |
include Makefile.inc
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
SUBDIRS = kpatch-build kpatch kmod man contrib
|
|
Packit |
c71e3f |
BUILD_DIRS = $(SUBDIRS:%=build-%)
|
|
Packit |
c71e3f |
INSTALL_DIRS = $(SUBDIRS:%=install-%)
|
|
Packit |
c71e3f |
UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%)
|
|
Packit |
c71e3f |
CLEAN_DIRS = $(SUBDIRS:%=clean-%)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
UNITTEST_DIR = test/unit
|
|
Packit |
c71e3f |
CLEAN_DIRS += clean-$(UNITTEST_DIR)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
.PHONY: all install uninstall clean check unit
|
|
Packit |
c71e3f |
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
all: $(BUILD_DIRS)
|
|
Packit |
c71e3f |
$(BUILD_DIRS):
|
|
Packit |
c71e3f |
$(MAKE) -C $(@:build-%=%)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
install: $(INSTALL_DIRS)
|
|
Packit |
c71e3f |
$(INSTALL_DIRS):
|
|
Packit |
c71e3f |
$(MAKE) -C $(@:install-%=%) install
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
uninstall: $(UNINSTALL_DIRS)
|
|
Packit |
c71e3f |
$(UNINSTALL_DIRS):
|
|
Packit |
c71e3f |
$(MAKE) -C $(@:uninstall-%=%) uninstall
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
clean: $(CLEAN_DIRS)
|
|
Packit |
c71e3f |
$(CLEAN_DIRS):
|
|
Packit |
c71e3f |
$(MAKE) -C $(@:clean-%=%) clean
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
unit: $(UNITTEST_DIR)/Makefile build-kpatch-build
|
|
Packit |
c71e3f |
$(MAKE) -C $(UNITTEST_DIR)
|
|
Packit |
c71e3f |
|
|
Packit |
c71e3f |
check:
|
|
Packit |
c71e3f |
shellcheck kpatch/kpatch kpatch-build/kpatch-build kpatch-build/kpatch-gcc
|