1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
ARCH=@ARCH@
AR=@AR@
LD=@LD@
CC=@CC@
CXX=@CXX@
SYSDIR=@abs_top_srcdir@/system/players/dvdplayer
ifeq (@USE_ANDROID@,1)
AVPREFIX=lib
else
AVPREFIX=
endif
AVFORMAT_SO=$(AVPREFIX)avformat-54-$(ARCH).so
AVCODEC_SO=$(AVPREFIX)avcodec-54-$(ARCH).so
AVUTIL_SO=$(AVPREFIX)avutil-52-$(ARCH).so
AVFILTER_SO=$(AVPREFIX)avfilter-3-$(ARCH).so
SWSCALE_SO=$(AVPREFIX)swscale-2-$(ARCH).so
POSTPROC_SO=$(AVPREFIX)postproc-52-$(ARCH).so
SWRESAMPLE_SO=$(AVPREFIX)swresample-0-$(ARCH).so
DIRS=
ifneq (@USE_EXTERNAL_FFMPEG@,1)
DIRS+=ffmpeg
endif
LIBS=
ifneq (@USE_EXTERNAL_FFMPEG@,1)
ifneq (@USE_STATIC_FFMPEG@,1)
LIBS+=$(AVUTIL_SO) \
$(AVCODEC_SO) \
$(AVFORMAT_SO) \
$(POSTPROC_SO) \
$(AVFILTER_SO) \
$(SWSCALE_SO) \
$(SWRESAMPLE_SO)
endif
endif
.PHONY: $(DIRS) codecs
ifneq ($(findstring osx,$(ARCH)), osx)
ifneq (@USE_STATIC_FFMPEG@,1)
codecs: $(addprefix $(SYSDIR)/, $(LIBS));
$(SYSDIR)/$(AVUTIL_SO): ffmpeg/libavutil/libavutil.so
cp ffmpeg/libavutil/libavutil.so $@
$(SYSDIR)/$(AVCODEC_SO): ffmpeg/libavcodec/libavcodec.so
cp ffmpeg/libavcodec/libavcodec.so $@
$(SYSDIR)/$(AVFORMAT_SO): ffmpeg/libavformat/libavformat.so
cp ffmpeg/libavformat/libavformat.so $@
$(SYSDIR)/$(AVFILTER_SO): ffmpeg/libavfilter/libavfilter.so
cp ffmpeg/libavfilter/libavfilter.so $@
$(SYSDIR)/$(SWSCALE_SO): ffmpeg/libswscale/libswscale.so
cp ffmpeg/libswscale/libswscale.so $@
$(SYSDIR)/$(POSTPROC_SO): ffmpeg/libpostproc/libpostproc.so
cp ffmpeg/libpostproc/libpostproc.so $@
$(SYSDIR)/$(SWRESAMPLE_SO): ffmpeg/libswresample/libswresample.so
cp ffmpeg/libswresample/libswresample.so $@
ffmpeg/libavutil/libavutil.so : ffmpeg;
ffmpeg/libavcodec/libavcodec.so : ffmpeg;
ffmpeg/libavformat/libavformat.so : ffmpeg;
ffmpeg/libavfilter/libavfilter.so : ffmpeg;
ffmpeg/libswscale/libswscale.so : ffmpeg;
ffmpeg/libpostproc/libpostproc.so : ffmpeg;
ffmpeg/libswresample/libswresample.so : ffmpeg;
endif
endif
ifeq (@USE_STATIC_FFMPEG@,1)
ffmpeg/libavutil/libavutil.a : ffmpeg;
ffmpeg/libavcodec/libavcodec.a : ffmpeg;
ffmpeg/libavformat/libavformat.a : ffmpeg;
ffmpeg/libavfilter/libavfilter.a : ffmpeg;
ffmpeg/libswscale/libswscale.a : ffmpeg;
ffmpeg/libpostproc/libpostproc.a : ffmpeg;
ffmpeg/libswresample/libswresample.a : ffmpeg;
endif
ffmpeg:
$(MAKE) -C $@
ifeq ($(findstring osx,$(ARCH)), osx)
-$(AR) d ffmpeg/libavcodec/libavcodec.a log2_tab.o
-$(AR) d ffmpeg/libavformat/libavformat.a log2_tab.o
-$(AR) d ffmpeg/libswresample/libswresample.a log2_tab.o
endif
clean:
rm -f $(addprefix $(SYSDIR)/, $(LIBS))
for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" clean); fi ); done
distclean:
rm -f $(addprefix $(SYSDIR)/, $(LIBS))
for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" distclean || $(MAKE) -C "$$d" clean); fi ); done
|