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>
73 lines
2.1 KiB
Makefile
73 lines
2.1 KiB
Makefile
# SPDX-License-Identifier: MIT
|
|
ccflags-y += -I $(src)/include
|
|
ccflags-y += -I $(src)/include/nvkm
|
|
ccflags-y += -I $(src)/nvkm
|
|
ccflags-y += -I $(src)
|
|
|
|
# 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
|
|
nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o
|
|
nouveau-y += nouveau_nvif.o
|
|
nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
|
|
nouveau-y += nouveau_usif.o # userspace <-> nvif
|
|
nouveau-y += nouveau_vga.o
|
|
|
|
# DRM - memory management
|
|
nouveau-y += nouveau_bo.o
|
|
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
|
|
nouveau-y += nouveau_gem.o
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_SVM) += nouveau_svm.o
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_SVM) += nouveau_dmem.o
|
|
nouveau-y += nouveau_mem.o
|
|
nouveau-y += nouveau_prime.o
|
|
nouveau-y += nouveau_sgdma.o
|
|
nouveau-y += nouveau_ttm.o
|
|
nouveau-y += nouveau_vmm.o
|
|
nouveau-y += nouveau_exec.o
|
|
nouveau-y += nouveau_sched.o
|
|
nouveau-y += nouveau_uvmm.o
|
|
|
|
# DRM - modesetting
|
|
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
|
|
nouveau-y += nouveau_bios.o
|
|
nouveau-y += nouveau_connector.o
|
|
nouveau-y += nouveau_display.o
|
|
nouveau-y += nouveau_dp.o
|
|
include $(src)/dispnv04/Kbuild
|
|
include $(src)/dispnv50/Kbuild
|
|
|
|
# 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
|
|
|
|
obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
|