diff --git a/Makefile b/Makefile index 247edd37..a95dd420 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ # 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 $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.kleaf +include $(this_makefile_path)/Makefile.kleaf endif # Include kernel specific config ifneq ($(kernel_name),) -kernel_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/configs/Makefile.config.$(kernel_name) +kernel_config := $(this_makefile_path)/configs/Makefile.config.$(kernel_name) ifneq ($(wildcard $(kernel_config)),) include $(kernel_config) endif @@ -15,7 +17,7 @@ endif # Include system specific config ifneq ($(system_type),) -system_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/configs/Makefile.config.$(system_type) +system_config := $(this_makefile_path)/configs/Makefile.config.$(system_type) ifneq ($(wildcard $(system_config)),) include $(system_config) endif