-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 708 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (21 loc) · 708 Bytes
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
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2024 arttnba3 <arttnba@gmail.com>
NORNIR_ROOT_DIR=$(shell pwd)
NORNIR_SRC_DIR=$(NORNIR_ROOT_DIR)/src
LINUX_KERNEL_SRC=/lib/modules/$(shell uname -r)/build
all: .config
@$(MAKE) -C $(LINUX_KERNEL_SRC) M=$(NORNIR_SRC_DIR) modules
config:
@$(NORNIR_ROOT_DIR)/scripts/kconf.sh config
defconfig:
@cp $(NORNIR_SRC_DIR)/configs/x86_64_defconfig $(NORNIR_ROOT_DIR)/.config
menuconfig:
@$(NORNIR_ROOT_DIR)/scripts/kconf.sh menuconfig
.config:
@$(MAKE) config
$(NORNIR_SRC_DIR)/nornir.ko: all
install: $(NORNIR_SRC_DIR)/nornir.ko
@sudo insmod $(NORNIR_SRC_DIR)/nornir.ko
clean:
@$(MAKE) -C $(LINUX_KERNEL_SRC) M=$(NORNIR_SRC_DIR) clean
.PHONY: clean