Statistics
| Branch: | Tag: | Revision:

streamers-build / THIRDPARTY-LIBS / Makefile @ 076b687b

History | View | Annotate | Download (3.22 KB)

1
THIRDPARTYLIBS = $(shell pwd)
2
#NAPA-LIBS = NAPA-BASELIBS/monl/libmon.a NAPA-BASELIBS/ml/libml.a
3
#GRAPES-LIBS = GRAPES/src/libgrapes.a
4
#LIBS = $(GRAPES-LIBS) $(NAPA-LIBS)
5

    
6
.PHONY: GRAPES-build NAPA-build x264-build ffmpeg-build
7

    
8
all: GRAPES-build NAPA-build
9

    
10
x264/.git:
11
	cd .. && git submodule update --init $(shell dirname $(THIRDPARTYLIBS)/$@)
12

    
13
x264/config.mak: x264/.git
14
	cd x264 && ./configure --prefix=$(THIRDPARTYLIBS)/x264-install/ || { echo "Error configuring x264" && exit 1; }
15

    
16
x264-build: x264/config.mak
17
	$(MAKE) -C x264 || { echo "Error compiling x264" && exit 1; }
18

    
19
x264-install: x264-build
20
	$(MAKE) -C x264 install  || { echo "Error installing x264" && exit 1; }
21

    
22
libogg:
23
	wget http://downloads.xiph.org/releases/ogg/libogg-1.2.2.tar.gz && tar xzf libogg-1.2.2.tar.gz && mv libogg-1.2.2 libogg && rm libogg-1.2.2.tar.gz
24

    
25
libogg-install: libogg
26
	cd libogg && ./configure --disable-oggtest --disable-shared --prefix=$(THIRDPARTYLIBS)/libogg-install/ && make && make install
27

    
28
libvorbis:
29
	wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz && tar xzf libvorbis-1.3.2.tar.gz && mv libvorbis-1.3.2 libvorbis && rm libvorbis-1.3.2.tar.gz
30

    
31
libvorbis-install: libvorbis libogg-install
32
	cd libvorbis && ./configure --disable-oggtest --disable-shared --prefix=$(THIRDPARTYLIBS)/libvorbis-install/ --with-ogg=$(THIRDPARTYLIBS)/libogg-install/ && make && make install
33

    
34
mp3lame:
35
	wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz && tar xzf lame-3.98.4.tar.gz && rm -f lame-3.98.4.tar.gz && mv lame-3.98.4 mp3lame;
36

    
37
mp3lame-install: mp3lame
38
	cd mp3lame && ./configure --disable-gtktest --disable-frontend --disable-shared --prefix=$(THIRDPARTYLIBS)/mp3lame-install/ ${HOSTARCH:+--host=$HOSTARCH} && make && make install
39

    
40
ffmpeg/.git:
41
	cd .. && git submodule update --init $(shell dirname $(THIRDPARTYLIBS)/$@)
42

    
43
ffmpeg/config.mak: ffmpeg/.git x264-install libvorbis-install libogg-install mp3lame-install
44
	cd ffmpeg && ./configure --enable-libx264 --enable-libvorbis --enable-libmp3lame --enable-gpl --enable-pthreads --extra-cflags='-I$(THIRDPARTYLIBS)/x264-install/include -I$(THIRDPARTYLIBS)/libvorbis-install/include -I$(THIRDPARTYLIBS)/libogg-install/include -I$(THIRDPARTYLIBS)/mp3lame-install/include' --extra-ldflags='-L$(THIRDPARTYLIBS)/x264-install/lib -L$(THIRDPARTYLIBS)/libvorbis-install/lib -L$(THIRDPARTYLIBS)/libogg-install/lib -L$(THIRDPARTYLIBS)/mp3lame-install/lib' --prefix=$(THIRDPARTYLIBS)/ffmpeg-install || { echo "Error configuring ffmpeg" && exit 1; }
45
	#in case x264 is not reqired (do we need the encoding?): ./configure --enable-gpl --enable-pthreads --prefix=$BASEDIR/ffmpeg-install
46

    
47
ffmpeg-build: ffmpeg/config.mak
48
	$(MAKE) -C ffmpeg || { echo "Error compiling ffmpeg" && exit 1; }
49

    
50
ffmpeg-install: ffmpeg-build
51
	$(MAKE) -C ffmpeg install || { echo "Error installing ffmpeg" && exit 1; }
52

    
53
GRAPES/.git: ffmpeg-install
54
	cd .. && git submodule update --init $(shell dirname $(THIRDPARTYLIBS)/$@)
55

    
56
GRAPES-build: GRAPES/.git
57
	FFDIR=$(THIRDPARTYLIBS)/ffmpeg $(MAKE) -C GRAPES || { echo "Error compiling GRAPES" && exit 1; }
58

    
59
NAPA-BASELIBS/.git:
60
	cd .. && git submodule update --init $(shell dirname $(THIRDPARTYLIBS)/$@)
61

    
62
NAPA-build: NAPA-BASELIBS/.git
63
	cd NAPA-BASELIBS && ./build_all.sh -q
64

    
65
clean:
66
	$(MAKE) -C GRAPES clean