Files
linux-nv-oot/Makefile
Laxman Dewangan 9eaa638dfe nvidia-oot: fix the logic of path of makefile
The current makefile path is identified by the lastword of
MAKEFILE_LIST. This works fine till none of the makefile is
included before using the MAKEFILE_LIST, else the value of
the MAKEFILE_LIST get changed with new included makefile path
as last word.

Fix this by getting the path of current makefile at beginning
before including any new makefile path.

JIRA TMM-5842

Change-Id: I9d59e0b2f589dfa036d1f43850a05bc71f84aa48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262527
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00

51 lines
1.3 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
this_makefile_path := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))
ifeq ($(CONFIG_TEGRA_KLEAF_BUILD),y)
include $(this_makefile_path)/Makefile.kleaf
endif
# Include kernel specific config
ifneq ($(kernel_name),)
kernel_config := $(this_makefile_path)/configs/Makefile.config.$(kernel_name)
ifneq ($(wildcard $(kernel_config)),)
include $(kernel_config)
endif
endif
# Include system specific config
ifneq ($(system_type),)
system_config := $(this_makefile_path)/configs/Makefile.config.$(system_type)
ifneq ($(wildcard $(system_config)),)
include $(system_config)
endif
endif
LINUXINCLUDE += -I$(srctree.nvconftest)
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
subdir-ccflags-y += -Werror
subdir-ccflags-y += -Wmissing-prototypes
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION
endif
ifeq ($(CONFIG_TEGRA_SYSTEM_TYPE_ACK),y)
subdir-ccflags-y += -DCONFIG_TEGRA_SYSTEM_TYPE_ACK
subdir-ccflags-y += -Wno-sometimes-uninitialized
subdir-ccflags-y += -Wno-parentheses-equality
subdir-ccflags-y += -Wno-enum-conversion
subdir-ccflags-y += -Wno-implicit-fallthrough
endif
obj-m += drivers/
ifdef CONFIG_SND_SOC
obj-m += sound/soc/tegra/
obj-m += sound/tegra-safety-audio/
obj-m += sound/soc/tegra-virt-alt/
endif