aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile.in
blob: 45ae5df0cedb85a362761935a95dd2b6b35d08b7 (plain)
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
ARCH=@ARCH@

AR=@AR@
LD=@LD@
CC=@CC@
CXX=@CXX@
SYSDIR=@abs_top_srcdir@/system/players/dvdplayer

AVFORMAT_SO=avformat-53-$(ARCH).so
AVCODEC_SO=avcodec-53-$(ARCH).so
AVUTIL_SO=avutil-51-$(ARCH).so
AVFILTER_SO=avfilter-2-$(ARCH).so
SWSCALE_SO=swscale-2-$(ARCH).so
POSTPROC_SO=postproc-52-$(ARCH).so
SWRESAMPLE_SO=swresample-0-$(ARCH).so

DIRS=
ifneq (@USE_EXTERNAL_FFMPEG@,1)
  DIRS+=ffmpeg
endif

LIBS=
ifneq (@USE_EXTERNAL_FFMPEG@,1)
  LIBS+=$(AVUTIL_SO) \
	$(AVCODEC_SO) \
	$(AVFORMAT_SO) \
	$(POSTPROC_SO) \
	$(AVFILTER_SO) \
	$(SWSCALE_SO) \
	$(SWRESAMPLE_SO)
endif

.PHONY: $(DIRS) codecs

ifneq ($(findstring osx,$(ARCH)), osx)

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

ffmpeg:
	$(MAKE) -C $@
ifeq ($(findstring osx,$(ARCH)), osx)
	-$(AR) d ffmpeg/libavcodec/libavcodec.a inverse.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