mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 19:42:41 +00:00
libgstnvcustomhelper: add recipe
Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
This commit is contained in:
committed by
Matt Madison
parent
b9f39959c7
commit
381a6ed8d0
@@ -0,0 +1,74 @@
|
||||
From 3ca17db9635a7e9f682c7d4870684fab44ff8e5a Mon Sep 17 00:00:00 2001
|
||||
From: Matt Madison <matt@madison.systems>
|
||||
Date: Wed, 9 Aug 2023 08:42:41 -0700
|
||||
Subject: [PATCH] Makefile fixups for OE builds
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Signed-off-by: Matt Madison <matt@madison.systems>
|
||||
---
|
||||
Makefile.public | 28 ++++++++--------------------
|
||||
1 file changed, 8 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/Makefile.public b/Makefile.public
|
||||
index 6b97891..cd858fb 100644
|
||||
--- a/Makefile.public
|
||||
+++ b/Makefile.public
|
||||
@@ -21,8 +21,8 @@
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
################################################################################
|
||||
|
||||
-CXX:= gcc
|
||||
SRCS:= gst-nvcustomevent.c
|
||||
+libdir ?= /usr/lib
|
||||
|
||||
INCS:= $(wildcard *.h)
|
||||
OUT_DIR ?= .
|
||||
@@ -30,38 +30,26 @@ SO_NAME := libgstnvcustomhelper.so
|
||||
LIB:= $(OUT_DIR)/$(SO_NAME)
|
||||
OBJS := $(SRCS:%.c=$(OUT_DIR)/%.o)
|
||||
|
||||
-TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)
|
||||
-ifeq ($(TARGET_DEVICE),aarch64)
|
||||
- LIB_INSTALL_DIR?=/usr/lib/aarch64-linux-gnu/tegra/
|
||||
- CFLAGS:=
|
||||
-else
|
||||
- NVDS_VERSION ?=6.2
|
||||
- LIB_INSTALL_DIR ?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/
|
||||
- CFLAGS:= -DDS_VERSION=\"6.2.1\"
|
||||
-endif
|
||||
-
|
||||
CFLAGS+= -fPIC
|
||||
-
|
||||
+
|
||||
LIBS := -shared -Wl,-no-undefined
|
||||
-
|
||||
-LIBS+= -L$(LIB_INSTALL_DIR) -ldl\
|
||||
- -Wl,-rpath,$(LIB_INSTALL_DIR)
|
||||
|
||||
-PKGS:= gstreamer-1.0 gstreamer-base-1.0 gstreamer-video-1.0
|
||||
+PKGS:= gstreamer-1.0
|
||||
CFLAGS+= $(shell pkg-config --cflags $(PKGS))
|
||||
LIBS+= $(shell pkg-config --libs $(PKGS))
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(OUT_DIR)/%.o: %.c $(INCS) Makefile
|
||||
- @echo $(CFLAGS)
|
||||
- $(CXX) -c -o $@ $(CFLAGS) $<
|
||||
+ $(CC) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
$(LIB): $(OBJS) Makefile
|
||||
- $(CXX) -o $@ $(OBJS) $(LIBS)
|
||||
+ $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
|
||||
install: $(LIB)
|
||||
- cp -rv $(LIB) $(LIB_INSTALL_DIR)
|
||||
+ install -d $(DESTDIR)$(libdir)
|
||||
+ install -m0644 $(LIB) $(DESTDIR)$(libdir)/$(SO_NAME).1.0.0
|
||||
+ ln -sf $(SO_NAME).1.0.0 $(DESTDIR)$(libdir)/$(SO_NAME)
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJS) $(LIB)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
32
recipes-multimedia/gstreamer/libgstnvcustomhelper_35.4.1.bb
Normal file
32
recipes-multimedia/gstreamer/libgstnvcustomhelper_35.4.1.bb
Normal file
@@ -0,0 +1,32 @@
|
||||
DESCRIPTION = "NVIDIA custom gstreamer events helper library"
|
||||
SECTION = "multimedia"
|
||||
LICENSE = "MIT & Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.libgstnvcustomhelper;md5=9e0fe9cd844e2cba9b43e7a16ad5d431 \
|
||||
file://README;endline=11;md5=8a55074f13f4cdb3c9966343177e1f9e \
|
||||
"
|
||||
|
||||
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/libgstnvcustomhelper_src.tbz2"
|
||||
|
||||
require recipes-bsp/tegra-sources/tegra-sources-35.4.1.inc
|
||||
|
||||
SRC_URI += " file://0001-Makefile-fixups-for-OE-builds.patch"
|
||||
|
||||
DEPENDS = "gstreamer1.0"
|
||||
|
||||
S = "${WORKDIR}/gst-nvcustomhelper"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
EXTRA_OEMAKE = "-C ${S} -f Makefile.public OUT_DIR=${B}"
|
||||
|
||||
do_install() {
|
||||
oe_runmake install DESTDIR="${D}"
|
||||
install -d ${D}${includedir}
|
||||
install -m0644 ${S}/gst-nvcustomevent.h ${D}${includedir}/
|
||||
}
|
||||
RPROVIDES:${PN} += "libgstnvcustomhelper.so()(64bit)"
|
||||
|
||||
FILES:${PN} = "${libdir}/libgstnvcustomhelper.so*"
|
||||
FILES_SOLIBSDEV = ""
|
||||
INSANE_SKIP:${PN} = "dev-so"
|
||||
Reference in New Issue
Block a user