mirror of
git://nv-tegra.nvidia.com/tegra/gst-src/libgstnvcustomhelper.git
synced 2025-12-22 09:22:44 +03:00
58763dce79c555646e8fe2a3c82b99cd73e45726 - gst-nvcustomhelper/Makefile 39d54795c60e7436359259ede5ee6537a11b3fcc - gst-nvcustomhelper/README 1d05e15078ee65457a1e033a35ff53969b49dbae - gst-nvcustomhelper/LICENSE.libgstnvcustomhelper 0097bc2585174e27d28bc14eb4db9ed733d5d0a5 - gst-nvcustomhelper/Makefile.public 6911bbbbdf879f293204b444447b7c248e713bba - gst-nvcustomhelper/gst-nvcustomevent.c d27a433ddeaefb9f42d0312c23472514b0cd6a45 - gst-nvcustomhelper/gst-nvcustomevent.h Change-Id: I24ae52d27604cb04d7521139d61df27d5d9fb282
68 lines
2.8 KiB
Makefile
68 lines
2.8 KiB
Makefile
################################################################################
|
|
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
# 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.
|
|
################################################################################
|
|
|
|
CXX:= gcc
|
|
SRCS:= gst-nvcustomevent.c
|
|
|
|
INCS:= $(wildcard *.h)
|
|
OUT_DIR ?= .
|
|
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
|
|
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) $<
|
|
|
|
$(LIB): $(OBJS) Makefile
|
|
$(CXX) -o $@ $(OBJS) $(LIBS)
|
|
|
|
install: $(LIB)
|
|
cp -rv $(LIB) $(LIB_INSTALL_DIR)
|
|
|
|
clean:
|
|
rm -rf $(OBJS) $(LIB)
|