2019-07-05 15:11:42 +10:00
|
|
|
# SPDX-License-Identifier: MIT
|
kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:
src := $(obj)
When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.
This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.
To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.
Going forward, the variables used in Makefiles will have the following
meanings:
$(obj) - directory in the object tree
$(src) - directory in the source tree (changed by this commit)
$(objtree) - the top of the kernel object tree
$(srctree) - the top of the kernel source tree
Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-04-27 23:55:02 +09:00
|
|
|
ccflags-y += -I $(src)/include
|
|
|
|
ccflags-y += -I $(src)/include/nvkm
|
|
|
|
ccflags-y += -I $(src)/nvkm
|
2024-11-14 13:02:36 +10:00
|
|
|
ccflags-y += -I $(src)/nvkm/subdev/gsp
|
kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:
src := $(obj)
When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.
This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.
To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.
Going forward, the variables used in Makefiles will have the following
meanings:
$(obj) - directory in the object tree
$(src) - directory in the source tree (changed by this commit)
$(objtree) - the top of the kernel object tree
$(srctree) - the top of the kernel source tree
Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-04-27 23:55:02 +09:00
|
|
|
ccflags-y += -I $(src)
|
2015-01-13 22:13:14 +10:00
|
|
|
|
|
|
|
# NVKM - HW resource manager
|
|
|
|
#- code also used by various userspace tools/tests
|
|
|
|
include $(src)/nvif/Kbuild
|
|
|
|
nouveau-y := $(nvif-y)
|
|
|
|
|
|
|
|
# NVIF - NVKM interface library (NVKM user interface also defined here)
|
|
|
|
#- code also used by various userspace tools/tests
|
|
|
|
include $(src)/nvkm/Kbuild
|
|
|
|
nouveau-y += $(nvkm-y)
|
|
|
|
|
|
|
|
# DRM - general
|
|
|
|
ifdef CONFIG_X86
|
|
|
|
nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
|
|
|
|
endif
|
|
|
|
nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
|
|
|
|
nouveau-y += nouveau_drm.o
|
|
|
|
nouveau-y += nouveau_hwmon.o
|
|
|
|
nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
|
2016-08-25 03:57:07 +03:00
|
|
|
nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o
|
2015-01-13 22:13:14 +10:00
|
|
|
nouveau-y += nouveau_nvif.o
|
|
|
|
nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
|
|
|
|
nouveau-y += nouveau_vga.o
|
|
|
|
|
|
|
|
# DRM - memory management
|
|
|
|
nouveau-y += nouveau_bo.o
|
2020-06-22 15:37:19 +10:00
|
|
|
nouveau-y += nouveau_bo0039.o
|
|
|
|
nouveau-y += nouveau_bo5039.o
|
|
|
|
nouveau-y += nouveau_bo74c1.o
|
|
|
|
nouveau-y += nouveau_bo85b5.o
|
|
|
|
nouveau-y += nouveau_bo9039.o
|
|
|
|
nouveau-y += nouveau_bo90b5.o
|
|
|
|
nouveau-y += nouveau_boa0b5.o
|
2015-01-13 22:13:14 +10:00
|
|
|
nouveau-y += nouveau_gem.o
|
2018-07-05 12:57:12 +10:00
|
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_SVM) += nouveau_svm.o
|
2018-07-26 17:59:13 -04:00
|
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_SVM) += nouveau_dmem.o
|
2017-11-01 03:56:19 +10:00
|
|
|
nouveau-y += nouveau_mem.o
|
2015-01-13 22:13:14 +10:00
|
|
|
nouveau-y += nouveau_prime.o
|
|
|
|
nouveau-y += nouveau_sgdma.o
|
|
|
|
nouveau-y += nouveau_ttm.o
|
2017-11-01 03:56:19 +10:00
|
|
|
nouveau-y += nouveau_vmm.o
|
2023-08-04 20:23:51 +02:00
|
|
|
nouveau-y += nouveau_exec.o
|
|
|
|
nouveau-y += nouveau_sched.o
|
|
|
|
nouveau-y += nouveau_uvmm.o
|
2015-01-13 22:13:14 +10:00
|
|
|
|
|
|
|
# DRM - modesetting
|
|
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
|
2018-05-08 20:39:47 +10:00
|
|
|
nouveau-y += nouveau_bios.o
|
2015-01-13 22:13:14 +10:00
|
|
|
nouveau-y += nouveau_connector.o
|
|
|
|
nouveau-y += nouveau_display.o
|
|
|
|
nouveau-y += nouveau_dp.o
|
2018-05-08 20:39:47 +10:00
|
|
|
include $(src)/dispnv04/Kbuild
|
|
|
|
include $(src)/dispnv50/Kbuild
|
2015-01-13 22:13:14 +10:00
|
|
|
|
|
|
|
# DRM - command submission
|
|
|
|
nouveau-y += nouveau_abi16.o
|
|
|
|
nouveau-y += nouveau_chan.o
|
|
|
|
nouveau-y += nouveau_dma.o
|
|
|
|
nouveau-y += nouveau_fence.o
|
|
|
|
nouveau-y += nv04_fence.o
|
|
|
|
nouveau-y += nv10_fence.o
|
|
|
|
nouveau-y += nv17_fence.o
|
|
|
|
nouveau-y += nv50_fence.o
|
|
|
|
nouveau-y += nv84_fence.o
|
|
|
|
nouveau-y += nvc0_fence.o
|
2025-02-07 14:16:11 +10:00
|
|
|
nouveau-y += gv100_fence.o
|
2015-01-13 22:13:14 +10:00
|
|
|
|
|
|
|
obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
|