File: Makefile

package info (click to toggle)
kpatch 0.6.0-0.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,652 kB
  • sloc: ansic: 8,393; sh: 1,611; makefile: 228; asm: 35; pascal: 21
file content (36 lines) | stat: -rw-r--r-- 865 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
include Makefile.inc

SUBDIRS     = kpatch-build kpatch kmod man contrib
BUILD_DIRS   = $(SUBDIRS:%=build-%)
INSTALL_DIRS = $(SUBDIRS:%=install-%)
UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%)
CLEAN_DIRS   = $(SUBDIRS:%=clean-%)

UNITTEST_DIR = test/unit
CLEAN_DIRS  += clean-$(UNITTEST_DIR)

.PHONY: all install uninstall clean check unit
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)


all: $(BUILD_DIRS)
$(BUILD_DIRS):
	$(MAKE) -C $(@:build-%=%)

install: $(INSTALL_DIRS)
$(INSTALL_DIRS):
	$(MAKE) -C $(@:install-%=%) install

uninstall: $(UNINSTALL_DIRS)
$(UNINSTALL_DIRS):
	$(MAKE) -C $(@:uninstall-%=%) uninstall

clean: $(CLEAN_DIRS)
$(CLEAN_DIRS):
	$(MAKE) -C $(@:clean-%=%) clean

unit: $(UNITTEST_DIR)/Makefile build-kpatch-build
	$(MAKE) -C $(UNITTEST_DIR)

check:
	shellcheck kpatch/kpatch kpatch-build/kpatch-build kpatch-build/kpatch-gcc