]> git.sesse.net Git - mlt/blob - src/modules/avformat/Makefile
OS/X Patch from Torsten Spindler
[mlt] / src / modules / avformat / Makefile
1 include ../../../config.mak
2 include config.mak
3
4 TARGET = ../libmltavformat$(LIBSUF)
5
6 OBJS = factory.o \
7            producer_avformat.o \
8            consumer_avformat.o \
9            filter_avcolour_space.o \
10            filter_avresample.o
11
12 ifdef MMX_FLAGS
13         OBJS += filter_avdeinterlace.o
14 endif
15
16 CFLAGS+=-I../..
17
18 LDFLAGS+=-L../../framework
19
20 ifdef LOCAL_FFMPEG 
21         LDFLAGS+=-lmltavformat -lmltavcodec $(EXTRA_LIBS) -lmlt
22 else
23         LDFLAGS+=-lavformat -lavcodec $(EXTRA_LIBS) -lmlt
24 endif
25
26 SRCS := $(OBJS:.o=.c)
27
28 all:    $(TARGET)
29
30 $(TARGET): $(OBJS)
31                 if [ $(LOCAL_FFMPEG) ] ; then \
32                         $(MAKE) -C ffmpeg all ; \
33                         cp -f ffmpeg/libavcodec/libavcodec$(LIBSUF) ../../framework/libmltavcodec$(LIBSUF) ; \
34                         cp -f ffmpeg/libavformat/libavformat$(LIBSUF) ../../framework/libmltavformat$(LIBSUF) ; \
35                 fi
36                 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
37
38 depend: $(SRCS)
39                 if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dep ; fi
40                 $(CC) -MM $(CFLAGS) $^ 1>.depend
41
42 dist-clean:     clean
43                 if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg dist-clean ; fi
44                 rm -f .depend
45
46 clean:  
47                 #if [ $(LOCAL_FFMPEG) ] ; then $(MAKE) -C ffmpeg clean ; fi
48                 rm -f $(OBJS) $(TARGET) 
49
50 install: all
51                 install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
52                 if [ $(LOCAL_FFMPEG) ] ; then \
53                         install -m 755 ../../framework/libmltavcodec.$(LIBSUF) "$(prefix)/share/mlt/modules" ; \
54                         install -m 755 ../../framework/libmltavformat.$(LIBSUF) "$(prefix)/share/mlt/modules" ; \
55                 fi
56
57 ifneq ($(wildcard .depend),)
58 include .depend
59 endif