avformat-cvs build fix and audio filter correction
[melted] / src / modules / avformat / Makefile
index aba87af..37bf55a 100644 (file)
@@ -7,20 +7,32 @@ OBJS = factory.o \
           producer_avformat.o \
           consumer_avformat.o \
           filter_avcolour_space.o \
-          filter_avdeinterlace.o \
           filter_avresample.o
 
+ifdef MMX_FLAGS
+       OBJS += filter_avdeinterlace.o
+endif
+
 CFLAGS+=-I../..
 
-LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS)
-LDFLAGS+=-L../../framework -lmlt
+LDFLAGS+=-L../../framework
+
+ifdef LOCAL_FFMPEG 
+       LDFLAGS+=-lmltavformat -lmltavcodec $(EXTRA_LIBS) -lmlt
+else
+       LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS) -lmlt
+endif
 
 SRCS := $(OBJS:.o=.c)
 
 all:   $(TARGET)
 
 $(TARGET): $(OBJS)
-               if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg all ; fi
+               if [ $(LOCAL_FFMPEG) ] ; then \
+                       $(MAKE) -C ffmpeg all ; \
+                       cp -f ffmpeg/libavcodec/libavcodec.so ../../framework/libmltavcodec.so ; \
+                       cp -f ffmpeg/libavformat/libavformat.so ../../framework/libmltavformat.so ; \
+               fi
                $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
 
 depend:        $(SRCS)
@@ -32,11 +44,15 @@ dist-clean: clean
                rm -f .depend
 
 clean: 
-               if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
+               #if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
                rm -f $(OBJS) $(TARGET) 
 
 install: all
                install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
+               if [ $(LOCAL_FFMPEG) ] ; then \
+                       install -m 755 ../../framework/libmltavcodec.so "$(prefix)/share/mlt/modules" ; \
+                       install -m 755 ../../framework/libmltavformat.so "$(prefix)/share/mlt/modules" ; \
+               fi
 
 ifneq ($(wildcard .depend),)
 include .depend