]> git.sesse.net Git - mlt/blob - src/modules/avformat/Makefile
0d26b04b8aeaa6d4bd34de3931340ad12eb155bb
[mlt] / src / modules / avformat / Makefile
1 CFLAGS += -I../..
2 LDFLAGS += -L../../framework -lmlt -lpthread
3
4 include ../../../config.mak
5 include config.mak
6
7 LDFLAGS += -lavformat$(AVFORMAT_SUFFIX)
8 LDFLAGS += -lavcodec$(AVFORMAT_SUFFIX)
9 LDFLAGS += -lavutil$(AVFORMAT_SUFFIX)
10 LDFLAGS += -lswscale$(AVFORMAT_SUFFIX)
11 LDFLAGS += $(EXTRA_LIBS)
12
13 ifndef CODECS
14 TARGET = ../libmltffmpeg$(LIBSUF)
15 else
16 TARGET = ../libmltavformat$(LIBSUF)
17 endif
18
19 OBJS = factory.o
20
21 ifdef FILTERS
22 OBJS += filter_avcolour_space.o \
23             filter_avresample.o \
24             filter_avdeinterlace.o \
25             filter_swscale.o
26 CFLAGS += -DFILTERS
27 endif
28
29 ifdef VDPAU
30 CFLAGS += -DVDPAU `pkg-config --cflags x11`
31 LDFLAGS += $(LIBDL) `pkg-config --libs x11`
32 endif
33
34 ifdef CODECS
35 OBJS += producer_avformat.o \
36             consumer_avformat.o
37 CFLAGS += -DCODECS
38 endif
39
40 ifdef DEVICES
41 CFLAGS += -DAVDEVICE
42 LDFLAGS += -lavdevice$(AVFORMAT_SUFFIX)
43 endif
44
45 SRCS := $(OBJS:.o=.c)
46
47 all:    $(TARGET)
48
49 $(TARGET): $(OBJS)
50         $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
51
52 depend: $(SRCS)
53         $(CC) -MM $(CFLAGS) $^ 1>.depend
54
55 distclean:      clean
56         rm -f .depend
57
58 clean:  
59         rm -f $(OBJS) ../libmltffmpeg$(LIBSUF) ../libmltavformat$(LIBSUF)
60
61 install: all
62         install -m 755 $(TARGET) "$(DESTDIR)$(moduledir)"
63         install -d "$(DESTDIR)$(mltdatadir)/avformat"
64         install -m 644 producer_avformat.yml "$(DESTDIR)$(mltdatadir)/avformat"
65         install -m 644 consumer_avformat.yml "$(DESTDIR)$(mltdatadir)/avformat"
66
67 uninstall:
68         rm "$(DESTDIR)$(moduledir)/libmltavformat$(LIBSUF)" 2> /dev/null || true
69         rm "$(DESTDIR)$(moduledir)/libmltffmpeg$(LIBSUF)" 2> /dev/null || true
70         rm -rf "$(DESTDIR)$(mltdatadir)/avformat"
71
72 ifneq ($(wildcard .depend),)
73 include .depend
74 endif