From d59e0dd075e3c79bdbe02cae327e6b44d8e7566c Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Thu, 3 Feb 2011 18:08:41 +0000 Subject: [PATCH] Add support for removing ffms support and properly link ffms into libaegisub. Originally committed to SVN as r5283. --- aegisub/libaegisub/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/aegisub/libaegisub/Makefile b/aegisub/libaegisub/Makefile index d9fd5e251..4c381604b 100644 --- a/aegisub/libaegisub/Makefile +++ b/aegisub/libaegisub/Makefile @@ -17,9 +17,19 @@ LDFLAGS += -L../universalchardet -luniversalchardet endif common/charset_conv.o: CXXFLAGS += $(CFLAGS_ICONV) + +####################### +# AUDIO / VIDEO SUPPORT +####################### +ifeq (yes, $(HAVE_PROVIDER_FFMPEGSOURCE)) +SRC_OPT += media/ffms_audio.cpp media/ffms_common.cpp media/ffms_video.cpp common/ffms.o: CXXFLAGS += $(CFLAGS_FFMPEGSOURCE) $(CFLAGS_LIBAVFORMAT) $(CFLAGS_LIBAVCODEC) $(CFLAGS_LIBSWSCALE) $(CFLAGS_LIBAVUTIL) $(CFLAGS_LIBPOSTPROC) common/ffms_audio.o: CXXFLAGS += $(CFLAGS_FFMPEGSOURCE) $(CFLAGS_LIBAVFORMAT) $(CFLAGS_LIBAVCODEC) $(CFLAGS_LIBSWSCALE) $(CFLAGS_LIBAVUTIL) $(CFLAGS_LIBPOSTPROC) common/ffms_video.o: CXXFLAGS += $(CFLAGS_FFMPEGSOURCE) $(CFLAGS_LIBAVFORMAT) $(CFLAGS_LIBAVCODEC) $(CFLAGS_LIBSWSCALE) $(CFLAGS_LIBAVUTIL) $(CFLAGS_LIBPOSTPROC) +#LDFLAGS += $(LDFLAGS_FFMPEGSOURCE) $(LDFLAGS_LIBAVFORMAT) $(LDFLAGS_LIBAVCODEC) $(LDFLAGS_LIBSWSCALE) $(LDFLAGS_LIBAVUTIL) $(LDFLAGS_LIBPOSTPROC) +LDFLAGS_POST += $(LDFLAGS_FFMPEGSOURCE) +endif + SRC = \ common/charset.cpp \ @@ -34,14 +44,12 @@ SRC = \ common/log.cpp \ common/validator.cpp \ common/vfr.cpp \ - media/ffms_audio.cpp \ - media/ffms_common.cpp \ - media/ffms_video.cpp \ media/video_frame.cpp \ unix/util.cpp \ unix/io.cpp \ unix/access.cpp \ - unix/log.cpp + unix/log.cpp \ + $(SRC_OPT) ifeq (yes, $(BUILD_DARWIN)) SRC += \