summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-09-29 15:09:19 -0300
committerJames Almer <jamrial@gmail.com>2017-09-29 15:12:43 -0300
commitb25d6290c67e193b91becab12e6c88df134cee81 (patch)
tree381d5e4fe13350899640699d129ac32c1d41caef /Makefile
parent6f7bd8cd90de3c970d1d73a29ac5749ffe2e2f95 (diff)
parentacb0dea27efff4b35796015b96570b59fd517078 (diff)
downloadffmpeg-b25d6290c67e193b91becab12e6c88df134cee81.tar.gz
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e4eb050226..43ce03130a 100644
--- a/Makefile
+++ b/Makefile
@@ -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*