On Mon, 9 Jun 2025, softworkz wrote:

From: softworkz <softwo...@hotmail.com>

Signed-off-by: softworkz <softwo...@hotmail.com>
---
.gitignore       |  1 +
fftools/Makefile | 14 ++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 59c89da5e0..989c702b6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@
/.config
/.version
/ffmpeg
+/ffmpeg-sg

Please, do not copy this from tools folder to the main build dir. The rest of the tools are also simply kept in the tools folder, no copying is necessary during the build process.

Thanks,
Marton

/ffplay
/ffprobe
/config.asm
diff --git a/fftools/Makefile b/fftools/Makefile
index b3c08ae5a0..378de79665 100644
--- a/fftools/Makefile
+++ b/fftools/Makefile
@@ -5,6 +5,11 @@ AVPROGS-$(CONFIG_FFPROBE)  += ffprobe
AVPROGS     := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
PROGS       += $(AVPROGS)

+FFMPEG_SG_SCRIPT = $(SRC_PATH)/tools/ffmpeg-sg$(if $(filter 
.exe,$(EXESUF)),.cmd)
+FFMPEG_SG_TARGET = ffmpeg-sg$(EXESUF)
+FFMPEG_SG_ENABLED = $(and $(filter $(CONFIG_FFMPEG),yes),$(or $(filter 
$(target_os),win32),$(if $(target_os),,yes)))
+FFMPEG_SG_FILES = $(if $(FFMPEG_SG_ENABLED),$(FFMPEG_SG_TARGET))
+
AVBASENAMES  = ffmpeg ffplay ffprobe
ALLAVPROGS   = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
@@ -67,7 +72,10 @@ endef

$(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))

-all: $(AVPROGS)
+all: $(AVPROGS) $(FFMPEG_SG_FILES)
+
+$(FFMPEG_SG_TARGET): $(FFMPEG_SG_SCRIPT)
+       $(Q)$(CP) -p $(FFMPEG_SG_SCRIPT) $(FFMPEG_SG_TARGET)

fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
OUTDIRS += fftools
@@ -85,11 +93,13 @@ install-progs-$(CONFIG_SHARED): install-libs
install-progs: install-progs-yes $(AVPROGS)
        $(Q)mkdir -p "$(BINDIR)"
        $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
+       $(if $(FFMPEG_SG_FILES),$(INSTALL) -c -m 755 $(FFMPEG_SG_FILES) 
"$(BINDIR)")

uninstall: uninstall-progs

uninstall-progs:
        $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
+       $(if $(FFMPEG_SG_FILES),$(RM) "$(BINDIR)/$(FFMPEG_SG_FILES)")

clean::
-       $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%) 
$(CLEANSUFFIXES:%=fftools/graph/%) $(CLEANSUFFIXES:%=fftools/textformat/%)
+       $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%) 
$(CLEANSUFFIXES:%=fftools/graph/%) $(CLEANSUFFIXES:%=fftools/textformat/%) 
$(FFMPEG_SG_FILES)
--
ffmpeg-codebot
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to