From 35ea60fe80f29dd77916809ce948e2733db96285 Mon Sep 17 00:00:00 2001 From: asah Date: Thu, 10 Jan 2019 12:29:19 +0530 Subject: [PATCH] gpu: nvgpu: unit: extend unit test build system Added NV_COMPONENT_INCLUDES and NV_COMPONENT_NEEDED_INTERFACE_DIRS support as we need them for building QNX nvgpu_rmos/ files with the test library JIRA NVGPU-1352 Change-Id: If1944396dac2ac84fadd5cbb487fa700c829523a Signed-off-by: asah Reviewed-on: https://git-master.nvidia.com/r/1994355 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Philip Elcan Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/units/Makefile.units.common.tmk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/userspace/units/Makefile.units.common.tmk b/userspace/units/Makefile.units.common.tmk index 98441b8b3..f0588e35b 100644 --- a/userspace/units/Makefile.units.common.tmk +++ b/userspace/units/Makefile.units.common.tmk @@ -1,6 +1,6 @@ ################################### tell Emacs this is a -*- makefile-gmake -*- # -# Copyright (c) 2018 NVIDIA CORPORATION. All Rights Reserved. +# Copyright (c) 2018-2019 NVIDIA CORPORATION. All Rights Reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation @@ -29,12 +29,22 @@ NV_COMPONENT_SOURCES := \ $(NVGPU_UNIT_NAME).c endif +ifdef NVGPU_UNIT_INCLUDES +NV_COMPONENT_INCLUDES := \ + $(NVGPU_UNIT_INCLUDES) +endif + NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__ NV_COMPONENT_NEEDED_INTERFACE_DIRS += \ $(NV_SOURCE)/kernel/nvgpu/drivers/gpu/nvgpu \ $(NV_SOURCE)/kernel/nvgpu/userspace +ifdef NVGPU_UNIT_INTERFACE_DIRS +NV_COMPONENT_NEEDED_INTERFACE_DIRS += \ + $(NVGPU_UNIT_INTERFACE_DIRS) +endif + NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit/units systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR) $(NV_COMPONENT_SYSTEMIMAGE_DIR) : $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)