]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/Makefile
Version modules and data directories, and melt
[mlt] / src / modules / avformat / Makefile
index 7d889435ca1d23d7aded41a845039c9eaa7c2009..eceb375934b59b838fa230a520d82d9da5e1899e 100644 (file)
@@ -1,15 +1,13 @@
-include ../../../config.mak
-
 CFLAGS += -I../..
+LDFLAGS += -L../../framework -lmlt -lpthread
 
-LDFLAGS += -L../../framework -lmlt
-
+include ../../../config.mak
 include config.mak
 
 LDFLAGS += -lavformat$(AVFORMAT_SUFFIX)
 LDFLAGS += -lavcodec$(AVFORMAT_SUFFIX)
 LDFLAGS += -lavutil$(AVFORMAT_SUFFIX)
-LDFLAGS += -lavdevice$(AVFORMAT_SUFFIX) $(EXTRA_LIBS)
+LDFLAGS += $(EXTRA_LIBS)
 
 ifndef CODECS
 TARGET = ../libmltffmpeg$(LIBSUF)
@@ -29,6 +27,11 @@ endif
 CFLAGS += -DFILTERS
 endif
 
+ifdef VDPAU
+CFLAGS += -DVDPAU `pkg-config --cflags x11`
+LDFLAGS += $(LIBDL) `pkg-config --libs x11`
+endif
+
 ifdef CODECS
 OBJS += producer_avformat.o \
            consumer_avformat.o
@@ -40,46 +43,37 @@ CFLAGS += -DSWSCALE
 LDFLAGS += -lswscale$(AVFORMAT_SUFFIX)
 endif
 
-ifdef LOCAL_FFMPEG
-LOCAL_FFMPEG_OBJS = ffmpeg/libavformat/libavformat$(AVFORMAT_SUFFIX) \
-                    ffmpeg/libavcodec/libavcodec$(AVFORMAT_SUFFIX) \
-                    ffmpeg/libavutil/libavutil$(AVFORMAT_SUFFIX) \
-                    ffmpeg/libavutil/libavdevice$(AVFORMAT_SUFFIX)
+ifdef DEVICES
+CFLAGS += -DAVDEVICE
+LDFLAGS += -lavdevice$(AVFORMAT_SUFFIX)
 endif
 
 SRCS := $(OBJS:.o=.c)
 
 all:   $(TARGET)
 
-$(LOCAL_FFMPEG_OBJS):
-       if [ $(LOCAL_FFMPEG) ] ; then \
-               $(MAKE) -C ffmpeg ffmpeg ; \
-       fi
-
-$(TARGET): $(OBJS) $(LOCAL_FFMPEG_OBJS)
+$(TARGET): $(OBJS)
        $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
 
 depend:        $(SRCS)
-       if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dep ; fi
        $(CC) -MM $(CFLAGS) $^ 1>.depend
 
 distclean:     clean
-       if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg distclean ; fi
        rm -f .depend
 
 clean: 
-       #if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
        rm -f $(OBJS) ../libmltffmpeg$(LIBSUF) ../libmltavformat$(LIBSUF)
 
 install: all
-       install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
-       install -d "$(DESTDIR)$(prefix)/share/mlt/avformat"
-       install -m 644 producer_avformat.yml "$(DESTDIR)$(prefix)/share/mlt/avformat"
+       install -m 755 $(TARGET) "$(DESTDIR)$(moduledir)"
+       install -d "$(DESTDIR)$(mltdatadir)/avformat"
+       install -m 644 producer_avformat.yml "$(DESTDIR)$(mltdatadir)/avformat"
+       install -m 644 consumer_avformat.yml "$(DESTDIR)$(mltdatadir)/avformat"
 
 uninstall:
-       rm "$(DESTDIR)$(libdir)/mlt/libmltavformat$(LIBSUF)" 2> /dev/null || true
-       rm "$(DESTDIR)$(libdir)/mlt/libmltffmpeg$(LIBSUF)" 2> /dev/null || true
-       rm -rf "$(DESTDIR)$(prefix)/share/mlt/avformat"
+       rm "$(DESTDIR)$(moduledir)/libmltavformat$(LIBSUF)" 2> /dev/null || true
+       rm "$(DESTDIR)$(moduledir)/libmltffmpeg$(LIBSUF)" 2> /dev/null || true
+       rm -rf "$(DESTDIR)$(mltdatadir)/avformat"
 
 ifneq ($(wildcard .depend),)
 include .depend