changeset 33675:b48200e2a788

build: Simplify FFmpeg library handling.
author diego
date Tue, 28 Jun 2011 23:45:00 +0000
parents 4fc2a8d8a042
children 3e5faa206324
files Makefile
diffstat 1 files changed, 6 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jun 28 23:44:58 2011 +0000
+++ b/Makefile	Tue Jun 28 23:45:00 2011 +0000
@@ -682,14 +682,13 @@
                 libmpdemux/muxer_rawvideo.c \
                 $(SRCS_MENCODER-yes)
 
+# (linking) order matters for these libraries
+FFMPEGPARTS = libpostproc libswscale libavformat libavcodec libavutil
+FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
+FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm)))
 
-COMMON_LIBS-$(FFMPEG_A) += ffmpeg/libavformat/libavformat.a \
-                           ffmpeg/libavcodec/libavcodec.a   \
-                           ffmpeg/libpostproc/libpostproc.a \
-                           ffmpeg/libswscale/libswscale.a   \
-                           ffmpeg/libavutil/libavutil.a     \
-
-COMMON_LIBS += $(COMMON_LIBS-yes)
+COMMON_LIBS-$(FFMPEG_A)           += $(FFMPEGLIBS)
+COMMON_LIBS                       += $(COMMON_LIBS-yes)
 
 OBJS_COMMON    += $(addsuffix .o, $(basename $(SRCS_COMMON)))
 OBJS_MENCODER  += $(addsuffix .o, $(basename $(SRCS_MENCODER)))
@@ -776,15 +775,6 @@
 ADD_ALL_DIRS    = $(call ADDSUFFIXES,$(1),$(DIRS))
 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
 
-FFMPEGPARTS = libavcodec \
-              libavformat \
-              libavutil \
-              libpostproc \
-              libswscale \
-
-FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
-FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm)))
-
 
 
 ###### generic rules #######