aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-29 12:47:40 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-30 09:20:06 +0200
commit9362b5094114bd2f0cea74691ad900b19dac64f8 (patch)
treeb086f7827b6ec71ab965fe48df268d6c6b7b4a0e
parentf712f6c8a4bd14bae3c41118af642b5dae7f6e2b (diff)
downloadffmpeg-9362b5094114bd2f0cea74691ad900b19dac64f8.tar.gz
examples: move API examples to a dedicated dir in doc
-rw-r--r--doc/examples/Makefile21
-rw-r--r--doc/examples/api-example.c (renamed from libavcodec/api-example.c)0
-rw-r--r--doc/examples/output-example.c (renamed from libavformat/output-example.c)0
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavformat/Makefile1
5 files changed, 21 insertions, 3 deletions
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
new file mode 100644
index 0000000000..facbd7e178
--- /dev/null
+++ b/doc/examples/Makefile
@@ -0,0 +1,21 @@
+# use pkg-config for getting CFLAGS abd LDFLAGS
+FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
+CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
+LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
+
+EXAMPLES=api-example output-example
+
+OBJS=$(addsuffix .o,$(EXAMPLES))
+
+%: %.o
+ $(CC) $< $(LDFLAGS) -o $@
+
+%.o: %.c
+ $(CC) $< $(CFLAGS) -c -o $@
+
+.phony: all clean
+
+all: $(OBJS) $(EXAMPLES)
+
+clean:
+ rm -rf $(EXAMPLES) $(OBJS)
diff --git a/libavcodec/api-example.c b/doc/examples/api-example.c
index f34075e666..f34075e666 100644
--- a/libavcodec/api-example.c
+++ b/doc/examples/api-example.c
diff --git a/libavformat/output-example.c b/doc/examples/output-example.c
index f174305fe6..f174305fe6 100644
--- a/libavformat/output-example.c
+++ b/doc/examples/output-example.c
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 95d08eaaa8..76cb8cd161 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -674,8 +674,6 @@ SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
-EXAMPLES = api
-
TESTPROGS = cabac dct eval fft fft-fixed h264 iirfilter rangecoder snow
TESTPROGS-$(HAVE_MMX) += motion
TESTOBJS = dctref.o
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 55f6152f8d..6d3a0276de 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -340,7 +340,6 @@ OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
# libavdevice dependencies
OBJS-$(CONFIG_JACK_INDEV) += timefilter.o
-EXAMPLES = output
TESTPROGS = timefilter
include $(SUBDIR)../subdir.mak