-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (40 loc) · 1.43 KB
/
Makefile
File metadata and controls
44 lines (40 loc) · 1.43 KB
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
37
38
39
40
41
42
43
44
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2008-2023, NVIDIA CORPORATION. All rights reserved.
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
ifeq ($(CONFIG_ARM_FFA_TRANSPORT),m)
ifdef ALLOW_ARM_FFA_TRANSPORT_AS_MODULE
HAVE_ARM_FFA = $(CONFIG_ARM_FFA_TRANSPORT)
KBUILD_CFLAGS += -DMODS_HAS_ARM_FFA
endif
else
ifeq ($(CONFIG_ARM_FFA_TRANSPORT),y)
HAVE_ARM_FFA = $(CONFIG_ARM_FFA_TRANSPORT)
KBUILD_CFLAGS += -DMODS_HAS_ARM_FFA
endif
endif
HAVE_ARM_FFA ?=
obj-m := mods.o
mods-y := mods_krnl.o
mods-y += mods_mem.o
mods-y += mods_irq.o
mods-$(CONFIG_PCI) += mods_pci.o
mods-$(CONFIG_ACPI) += mods_acpi.o
mods-$(HAVE_ARM_FFA) += mods_arm_ffa.o
mods-$(CONFIG_DEBUG_FS) += mods_debugfs.o
mods-$(CONFIG_TEGRA_IVC) += mods_bpmpipc.o
mods-$(CONFIG_HAVE_ARM_SMCCC) += mods_arm_smccc.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default: module
module:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
endif