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