1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-06 08:29:25 +02:00

Merge commit 'acb0dea27efff4b35796015b96570b59fd517078'

* commit 'acb0dea27efff4b35796015b96570b59fd517078':
  build: Split logic for building examples off into a separate Makefile

We already have a Makefile in doc/examples, but it's separate from the build
system and meant to be installed as part of the documentation to help users
compile the installed .c example files.
Move it to Makefile.example to make place for the new build system Makefile.

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2017-09-29 15:09:19 -03:00
4 changed files with 92 additions and 83 deletions

View File

@@ -56,7 +56,6 @@ FFLIBS-$(CONFIG_SWSCALE) += swscale
FFLIBS := avutil
DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README
SKIPHEADERS = compat/w32pthreads.h
@@ -119,6 +118,7 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
include $(SRC_PATH)/doc/Makefile
include $(SRC_PATH)/doc/examples/Makefile
define DOPROG
OBJS-$(1) += $(1).o $(OBJS-$(1)-yes)
@@ -168,10 +168,11 @@ install-progs: install-progs-yes $(AVPROGS)
$(Q)mkdir -p "$(BINDIR)"
$(INSTALL) -c -m 755 $(INSTPROGS) "$(BINDIR)"
install-data: $(DATA_FILES) $(EXAMPLES_FILES)
install-data: $(DATA_FILES) $(EXAMPLES_FILES) $(EXAMPLE_MAKEFILE)
$(Q)mkdir -p "$(DATADIR)/examples"
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
$(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
$(INSTALL) -m 644 -T $(EXAMPLE_MAKEFILE:%=%.example) "$(DATADIR)/examples/Makefile"
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
@@ -219,5 +220,4 @@ $(sort $(OBJDIRS)):
# so this saves some time on slow systems.
.SUFFIXES:
.PHONY: all all-yes alltools check *clean config install*
.PHONY: testprogs uninstall*
.PHONY: all all-yes alltools check *clean config install* testprogs uninstall*