[MPlayer-cvslog] r32399 - in trunk: . Makefile common.mak configure subdir.mak

diego subversion at mplayerhq.hu
Tue Sep 28 22:46:19 CEST 2010


Author: diego
Date: Tue Sep 28 22:46:19 2010
New Revision: 32399

Log:
Use a single svn:externals declaration for all of FFmpeg.
This avoids duplicating parts of the FFmpeg build system locally,
which is a brittle and maintenance-heavy process.

Deleted:
   trunk/common.mak
   trunk/subdir.mak
Modified:
   trunk/   (props changed)
   trunk/Makefile
   trunk/configure

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Tue Sep 28 22:40:28 2010	(r32398)
+++ trunk/Makefile	Tue Sep 28 22:46:19 2010	(r32399)
@@ -717,12 +717,12 @@ SRCS_MENCODER = mencoder.c \
                 $(SRCS_MENCODER-yes)
 
 
-COMMON_LIBS-$(FFMPEG_A)           += libavformat/libavformat.a \
-                                     libavcodec/libavcodec.a   \
-                                     libavcore/libavcore.a     \
-                                     libavutil/libavutil.a     \
-                                     libpostproc/libpostproc.a \
-                                     libswscale/libswscale.a
+COMMON_LIBS-$(FFMPEG_A) += ffmpeg/libavformat/libavformat.a \
+                           ffmpeg/libavcodec/libavcodec.a   \
+                           ffmpeg/libavcore/libavcore.a     \
+                           ffmpeg/libavutil/libavutil.a     \
+                           ffmpeg/libpostproc/libpostproc.a \
+                           ffmpeg/libswscale/libswscale.a
 COMMON_LIBS += $(COMMON_LIBS-yes)
 
 OBJS_COMMON    += $(addsuffix .o, $(basename $(SRCS_COMMON)))
@@ -754,24 +754,24 @@ DIRS =  . \
         libaf \
         libao2 \
         libass \
-        libavcodec \
-        libavcodec/alpha \
-        libavcodec/arm \
-        libavcodec/bfin \
-        libavcodec/mlib \
-        libavcodec/ppc \
-        libavcodec/sh4 \
-        libavcodec/sparc \
-        libavcodec/x86 \
-        libavcore \
-        libavformat \
-        libavutil \
-        libavutil/arm \
-        libavutil/bfin \
-        libavutil/ppc \
-        libavutil/sh4 \
-        libavutil/tomi \
-        libavutil/x86 \
+        ffmpeg/libavcodec \
+        ffmpeg/libavcodec/alpha \
+        ffmpeg/libavcodec/arm \
+        ffmpeg/libavcodec/bfin \
+        ffmpeg/libavcodec/mlib \
+        ffmpeg/libavcodec/ppc \
+        ffmpeg/libavcodec/sh4 \
+        ffmpeg/libavcodec/sparc \
+        ffmpeg/libavcodec/x86 \
+        ffmpeg/libavcore \
+        ffmpeg/libavformat \
+        ffmpeg/libavutil \
+        ffmpeg/libavutil/arm \
+        ffmpeg/libavutil/bfin \
+        ffmpeg/libavutil/ppc \
+        ffmpeg/libavutil/sh4 \
+        ffmpeg/libavutil/tomi \
+        ffmpeg/libavutil/x86 \
         libdvdcss \
         libdvdnav \
         libdvdnav/vm \
@@ -783,12 +783,12 @@ DIRS =  . \
         libmpdemux \
         libmpeg2 \
         libpostproc \
-        libswscale \
-        libswscale/bfin \
-        libswscale/mlib \
-        libswscale/ppc \
-        libswscale/sparc \
-        libswscale/x86 \
+        ffmpeg/libswscale \
+        ffmpeg/libswscale/bfin \
+        ffmpeg/libswscale/mlib \
+        ffmpeg/libswscale/ppc \
+        ffmpeg/libswscale/sparc \
+        ffmpeg/libswscale/x86 \
         libvo \
         loader \
         loader/dshow \
@@ -817,8 +817,8 @@ FFMPEGPARTS = libavcodec \
               libpostproc \
               libswscale \
 
-FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), $(part)/$(part).a)
-FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(part)/*.[chS] $(part)/*/*.[chS]))
+FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
+FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard ffmpeg/$(part)/*.[chS] ffmpeg/$(part)/*/*.[chS]))
 
 
 
@@ -853,7 +853,7 @@ mencoder$(EXESUF) mplayer$(EXESUF):
 	$(CC) -o $@ $^ $(EXTRALIBS)
 
 codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
-	$(HOST_CC) -O -DCODECS2HTML -I. -o $@ $<
+	$(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $<
 
 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
 	./$^ > $@
@@ -990,10 +990,10 @@ clean:
 distclean: clean testsclean toolsclean driversclean dhahelperclean
 	-rm -rf DOCS/tech/doxygen
 	-rm -f $(call ADD_ALL_DIRS,/*.d)
-	-rm -f config.log config.mak config.h codecs.conf.h help_mp.h \
-           version.h $(VIDIX_PCI_FILES) TAGS tags
+	-rm -f config.* codecs.conf.h help_mp.h version.h TAGS tags
+	-rm -f $(VIDIX_PCI_FILES)
 	-rm -f $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
-	-rm -f libavutil/avconfig.h
+	-rm -f ffmpeg/libavutil/avconfig.h ffmpeg/config.mak
 
 doxygen:
 	doxygen DOCS/tech/Doxyfile
@@ -1011,14 +1011,14 @@ tags:
 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
 
 codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h help_mp.h $(TEST_OBJS)
-	$(CC) -I. -DTESTING -o $@ $^
+	$(CC) -I. -Iffmpeg -DTESTING -o $@ $^
 
 codecs2html$(EXESUF): codec-cfg.c help_mp.h $(TEST_OBJS)
-	$(CC) -I. -DCODECS2HTML -o $@ $^
+	$(CC) -I. -Iffmpeg -DCODECS2HTML -o $@ $^
 
 libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
 
-LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
+LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) ffmpeg/libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
 
 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
@@ -1058,7 +1058,7 @@ toolsclean:
 TOOLS/bmovl-test$(EXESUF): -lSDL_image
 
 TOOLS/subrip$(EXESUF): vobsub.o spudec.o unrar_exec.o libvo/aclib.o \
-    libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
+    ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(TEST_OBJS)
 
 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
 

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Sep 28 22:40:28 2010	(r32398)
+++ trunk/configure	Tue Sep 28 22:46:19 2010	(r32399)
@@ -583,22 +583,22 @@ _libavcodec_mpegaudio_hp=yes
 _libopencore_amrnb=auto
 _libopencore_amrwb=auto
 libopenjpeg=auto
-libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 libavdecoders=$(echo $libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g')
-libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 libavencoders=$(echo $libavencoders_all | sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s/AAC_ENCODER//)
-libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 libavparsers=$libavparsers_all
-libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 libavbsfs=$libavbsfs_all
-libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 # Disable all hardware accelerators for now.
 libavhwaccels=
-libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')
+libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
 libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//)
-libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')
+libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
 libavmuxers=$(echo $libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// -e s/RTSP_MUXER//)
-libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')
+libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
 libavprotocols=$libavprotocols_all
 _mencoder=yes
 _mplayer=yes
@@ -1476,7 +1476,7 @@ else # if test -z "$_target"
   fi
 fi
 
-extra_cflags="-I. $extra_cflags"
+extra_cflags="-I. -Iffmpeg $extra_cflags"
 _timer=timer-linux.c
 _getch=getch2.c
 if freebsd ; then
@@ -6934,11 +6934,11 @@ echores "$_librtmp"
 
 
 echocheck "FFmpeg"
-test -d libavutil ||
+test -d ffmpeg/libavutil ||
   die "MPlayer will not compile without libavutil in the source tree."
 ffmpeg=no
 if test "$ffmpeg_a" = auto ; then
-  test -d libavcore && ffmpeg_a=yes && ffmpeg=yes
+  test -d ffmpeg/libavcore && ffmpeg_a=yes && ffmpeg=yes
 elif test "$ffmpeg_so" = auto ; then
   ffmpeg_so=no
   if $_pkg_config --exists libavcore ; then
@@ -8251,7 +8251,7 @@ YASMDEP    = $_yasm
 YASMFLAGS  = $YASMFLAGS
 
 CONFIG_STATIC = yes
-SRC_PATH      = ..
+SRC_PATH      = ../..
 BUILD_ROOT    = ..
 LIBPREF       = lib
 LIBSUF        = .a
@@ -8828,7 +8828,7 @@ $def_av_fast_unaligned
 EOF
 
 # Do not overwrite an unchanged avconfig.h to avoid superfluous rebuilds.
-cmp -s "$TMPH" libavutil/avconfig.h || mv -f "$TMPH" libavutil/avconfig.h
+cmp -s "$TMPH" ffmpeg/libavutil/avconfig.h || mv -f "$TMPH" ffmpeg/libavutil/avconfig.h
 
 
 if x86; then
@@ -8842,6 +8842,12 @@ done
 cmp -s "$TMPS" config.asm || mv -f "$TMPS" config.asm
 fi
 
+
+# Create a config.mak for FFmpeg that includes MPlayer's config.mak.
+cat > ffmpeg/config.mak << EOF
+include ../../config.mak
+EOF
+
 #############################################################################
 
 cat << EOF


More information about the MPlayer-cvslog mailing list