LDFLAGS+=-L../../framework
-ifdef LOCAL_FFMPEG
- LDFLAGS+=-lavformat.mlt -lavcodec.mlt $(EXTRA_LIBS) -lmlt
-else
- LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS) -lmlt
-endif
+LDFLAGS+=-lavformat$(AVFORMAT_SUFFIX) -lavcodec$(AVFORMAT_SUFFIX) $(EXTRA_LIBS) -lmlt
SRCS := $(OBJS:.o=.c)
$(TARGET): $(OBJS)
if [ $(LOCAL_FFMPEG) ] ; then \
$(MAKE) -C ffmpeg all ; \
- cp -f ffmpeg/libavcodec/libavcodec$(LIBSUF) ../../framework/libavcodec.mlt$(LIBSUF) ; \
- cp -f ffmpeg/libavformat/libavformat$(LIBSUF) ../../framework/libavformat.mlt$(LIBSUF) ; \
+ cp -f ffmpeg/libavcodec/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ; \
+ cp -f ffmpeg/libavformat/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ; \
fi
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
clean:
#if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
- rm -f $(OBJS) $(TARGET)
+ rm -f ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) $(OBJS) $(TARGET)
install: all
install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
if [ $(LOCAL_FFMPEG) ] ; then \
- install -m 755 ../../framework/libavcodec.mlt$(LIBSUF) "$(prefix)/lib" ; \
- install -m 755 ../../framework/libavformat.mlt$(LIBSUF) "$(prefix)/lib" ; \
+ install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \
+ install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \
fi
ifneq ($(wildcard .depend),)
export shared_ffmpeg=`whereis ffmpeg | cut -f 2 -d' '`
export extra_libs=
export cvs_ffmpeg=
+ export avformat_suffix=
if [ "$shared_ffmpeg" != "" ]
then
--avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
--avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
--avformat-cvs ) cvs_ffmpeg=true ;;
+ --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
esac
done
if [ "$cvs_ffmpeg" != "" ]
then
- [ ! -d "ffmpeg" ] && cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
- [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared )
+ [ ! -d "ffmpeg" ] && (
+ echo
+ echo "Checking out ffmpeg/avformat - no password required"
+ echo
+ cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login
+ cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
+ )
+ [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared --build-suffix="$avformat_suffix" )
#[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec" >> config.mak
echo "LOCAL_FFMPEG=1" >> config.mak
fi
echo "EXTRA_LIBS=$extra_libs" >> config.mak
+ echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
cat << EOF >> ../producers.dat
avformat libmltavformat$LIBSUF
pthread_mutex_init( &avformat_mutex, NULL );
av_register_all( );
mlt_factory_register_for_clean_up( NULL, avformat_destroy );
- //av_log_set_level( -1 );
+ av_log_set_level( -1 );
}
}