Files
FFmpeg/fftools/Makefile
softworkz 517a805565 fftools/resources: Add resource manager files with build-time compression
Compression requires zlib to be available, otherwise resources will
be included uncompressed - in either case via BIN2C.

It can also be disabled via

./configure --disable-resource-compression

Size figures:

graph.css         7752
graph.css.min     6655 (css is always minified)
graph.html        2153

No Compression

graph.css.c      40026
graph.css.o       9344 (6688)
graph.html.c     13016
graph.html.o      4848 (2186)

With Compression

graph.css.c      10206
graph.css.o       4368 (1718)
graph.html.c      5725
graph.html.o      3632 (971)

Numbers in brackets: .rodata size from 'size -Ax -d *.o'

Signed-off-by: softworkz <softworkz@hotmail.com>
2025-05-15 23:08:05 +02:00

79 lines
2.3 KiB
Makefile

AVPROGS-$(CONFIG_FFMPEG) += ffmpeg
AVPROGS-$(CONFIG_FFPLAY) += ffplay
AVPROGS-$(CONFIG_FFPROBE) += ffprobe
AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
PROGS += $(AVPROGS)
AVBASENAMES = ffmpeg ffplay ffprobe
ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
OBJS-ffmpeg += \
fftools/ffmpeg_dec.o \
fftools/ffmpeg_demux.o \
fftools/ffmpeg_enc.o \
fftools/ffmpeg_filter.o \
fftools/ffmpeg_hw.o \
fftools/ffmpeg_mux.o \
fftools/ffmpeg_mux_init.o \
fftools/ffmpeg_opt.o \
fftools/ffmpeg_sched.o \
fftools/sync_queue.o \
fftools/thread_queue.o \
OBJS-ffprobe += \
fftools/textformat/avtextformat.o \
fftools/textformat/tf_compact.o \
fftools/textformat/tf_default.o \
fftools/textformat/tf_flat.o \
fftools/textformat/tf_ini.o \
fftools/textformat/tf_json.o \
fftools/textformat/tf_xml.o \
fftools/textformat/tw_avio.o \
fftools/textformat/tw_buffer.o \
fftools/textformat/tw_stdout.o \
OBJS-ffplay += fftools/ffplay_renderer.o
define DOFFTOOL
OBJS-$(1) += fftools/cmdutils.o fftools/opt_common.o fftools/$(1).o $(OBJS-$(1)-yes)
ifdef HAVE_GNU_WINDRES
OBJS-$(1) += fftools/fftoolsres.o
endif
$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): | fftools fftools/textformat fftools/resources
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
-include $$(OBJS-$(1):.o=.d)
endef
$(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
all: $(AVPROGS)
fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
OUTDIRS += fftools
OUTDIRS += fftools/textformat
OUTDIRS += fftools/resources
ifdef AVPROGS
install: install-progs install-data
endif
install-progs-yes:
install-progs-$(CONFIG_SHARED): install-libs
install-progs: install-progs-yes $(AVPROGS)
$(Q)mkdir -p "$(BINDIR)"
$(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
uninstall: uninstall-progs
uninstall-progs:
$(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
clean::
$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)