Yet another way to configure ffmpeg
[melted] / src / modules / avformat / Makefile
index e258004..d5096fa 100644 (file)
@@ -1,4 +1,5 @@
 include ../../../config.mak
+include config.mak
 
 TARGET = ../libmltavformat.so
 
@@ -8,28 +9,31 @@ OBJS = factory.o \
           filter_avdeinterlace.o \
           filter_avresample.o
 
-CFLAGS += -I../..
+CFLAGS+=-I../..
 
-LDFLAGS += -lavformat -lavcodec
+LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS)
 
 SRCS := $(OBJS:.o=.c)
 
 all:   $(TARGET)
 
 $(TARGET): $(OBJS)
+               if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg all ; fi
                $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
 
 depend:        $(SRCS)
+               if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dep ; fi
                $(CC) -MM $(CFLAGS) $^ 1>.depend
 
 dist-clean:    clean
+               if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dist-clean ; fi
                rm -f .depend
 
 clean: 
                rm -f $(OBJS) $(TARGET) 
 
 install: all
-       install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
+               install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
 
 ifneq ($(wildcard .depend),)
 include .depend