-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathMakefile
More file actions
20 lines (20 loc) · 744 Bytes
/
Makefile
File metadata and controls
20 lines (20 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ifneq (${KERNELRELEASE},)
obj-m += kkid.o
# Assignment module here
else
KERNEL_SOURCE := ../kernel_source/linux-4.18.16/
local: KERNEL_SOURCE := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
# Compile for the same architecture as the host machine
$(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=${PWD} modules
arm:
# Cross compile for arm64/aarch64 architecture - Cross compiler needed !!!
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- $(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=${PWD} modules
local:
# Compile for the same architecture as the host machine
$(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=${PWD} modules
clean:
# Cleans the Directory - removes all the files that were created
$(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=${PWD} clean
endif