From f86c10ed60fa175552488056a16ab232bebe0c09 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 15 Nov 2023 08:10:37 +0000 Subject: [PATCH] Makefile: yocto: Add header_install rule for Yocto Yocto makefile needs the installation of all public headers. Add Makefile and rule to achieve this. Bug 4365981 Change-Id: I986a5791246e83eb12a77d00998175f0630c796c Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3016433 Reviewed-by: Bitan Biswas Reviewed-by: Mayank Pandey Tested-by: Bitan Biswas --- Makefile.yocto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile.yocto diff --git a/Makefile.yocto b/Makefile.yocto new file mode 100644 index 0000000..2f39254 --- /dev/null +++ b/Makefile.yocto @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. +# +# The makefile to install public headers on desired path. + +# Get the path of Makefile +ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) + +headers_install: + mkdir -p $(INSTALL_HDR_PATH); \ + rsync -mrl --include='*/' --include='*\.h' --exclude='*' \ + $(ROOT_DIR)/include $(INSTALL_HDR_PATH) + +clean: + rm -rf $(INSTALL_HDR_PATH)