From 35799f369e61adf23a88475b3fde405afdfdc14a Mon Sep 17 00:00:00 2001 From: Divya Singhatwaria Date: Tue, 16 Jul 2019 19:18:42 +0530 Subject: [PATCH] gpu: nvgpu: libfalcon_utf for host makefiles Accessing falcon_utf objects from another directory introduces build dependencies and also stale .o files could be used. Fix this by generating a shared library: libfalcon_utf.so for falcon. JIRA NVGPU-2159 Change-Id: I510accbee2cddcf5c130f55bc993a393d90a802b Signed-off-by: Divya Singhatwaria Reviewed-on: https://git-master.nvidia.com/r/2154158 Reviewed-by: Mahantesh Kumbar Reviewed-by: Vijayakumar Subbu Reviewed-by: Sagar Kamble GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/Makefile.sources | 1 + userspace/units/falcon/Makefile | 27 ++++++++++++++++++++++++++ userspace/units/falcon/falcon/Makefile | 10 ++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 userspace/units/falcon/Makefile diff --git a/userspace/Makefile.sources b/userspace/Makefile.sources index 014914872..db89c066b 100644 --- a/userspace/Makefile.sources +++ b/userspace/Makefile.sources @@ -69,6 +69,7 @@ UNITS := \ $(UNIT_SRC)/fifo/tsg \ $(UNIT_SRC)/list \ $(UNIT_SRC)/enabled \ + $(UNIT_SRC)/falcon \ $(UNIT_SRC)/falcon/falcon ifeq ($(CONFIG_NVGPU_HAL_NON_FUSA),1) diff --git a/userspace/units/falcon/Makefile b/userspace/units/falcon/Makefile new file mode 100644 index 000000000..a5f5315a1 --- /dev/null +++ b/userspace/units/falcon/Makefile @@ -0,0 +1,27 @@ +# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +.SUFFIXES: + +OBJS = falcon_utf.o + +MODULE = falcon_utf + +include ../Makefile.units diff --git a/userspace/units/falcon/falcon/Makefile b/userspace/units/falcon/falcon/Makefile index 1ff5dea90..997444272 100644 --- a/userspace/units/falcon/falcon/Makefile +++ b/userspace/units/falcon/falcon/Makefile @@ -20,8 +20,14 @@ .SUFFIXES: -OBJS = ../falcon_utf.o \ - falcon.o +OBJS = falcon.o MODULE = falcon +LIB_PATHS += -lfalcon_utf + include ../../Makefile.units + +lib$(MODULE).so: falcon_utf + +falcon_utf: + $(MAKE) -C ..