X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2FMakefile;h=38bfbecf117d5f469cc6a352f61ce9a0a7b288fc;hb=6fd86f1596d75ebaa4703ca6e9735813331e5c2f;hp=d307bc2c2619cbf0bbc5f5a9487e369afa7b2af5;hpb=eae86b6ff2d11421e4839ffbe79c4c547d15751a;p=melted diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index d307bc2..38bfbec 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -17,42 +17,52 @@ CFLAGS+=-I../.. LDFLAGS+=-L../../framework -ifdef LOCAL_FFMPEG - LDFLAGS+=-lmltavformat -lmltavcodec $(EXTRA_LIBS) -lmlt -else - LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS) -lmlt +LDFLAGS+=-lavformat$(AVFORMAT_SUFFIX) -lavcodec$(AVFORMAT_SUFFIX) -lavutil$(AVFORMAT_SUFFIX) -lavdevice$(AVFORMAT_SUFFIX) $(EXTRA_LIBS) -lmlt + +ifdef SWSCALE + 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) endif SRCS := $(OBJS:.o=.c) all: $(TARGET) -$(TARGET): $(OBJS) - if [ $(LOCAL_FFMPEG) ] ; then \ - $(MAKE) -C ffmpeg all ; \ - cp -f ffmpeg/libavcodec/libavcodec$(LIBSUF) ../../framework/libmltavcodec$(LIBSUF) ; \ - cp -f ffmpeg/libavformat/libavformat$(LIBSUF) ../../framework/libmltavformat$(LIBSUF) ; \ - fi - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) +$(LOCAL_FFMPEG_OBJS): + if [ $(LOCAL_FFMPEG) ] ; then \ + $(MAKE) -C ffmpeg lib ; \ + fi + +$(TARGET): $(OBJS) $(LOCAL_FFMPEG_OBJS) + $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) depend: $(SRCS) - if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dep ; fi - $(CC) -MM $(CFLAGS) $^ 1>.depend + 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 +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) $(TARGET) + #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.$(LIBSUF) "$(prefix)/share/mlt/modules" ; \ - install -m 755 ../../framework/libmltavformat.$(LIBSUF) "$(prefix)/share/mlt/modules" ; \ - fi + 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" + +uninstall: + rm "$(DESTDIR)$(libdir)/mlt/libmltavformat$(LIBSUF)" + rm -rf "$(DESTDIR)$(prefix)/share/mlt/avformat" ifneq ($(wildcard .depend),) include .depend