streamers-build / THIRDPARTY-LIBS / Makefile @ 6dfa4ee8
History | View | Annotate | Download (4.3 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 |
NOGIT := $(shell [ -d ../.git ] || echo 1) |
7 |
GITREPOCHECK = .git/HEAD |
8 |
|
9 |
#configure FFMPEG |
10 |
CONFIG_FFMPEG += --disable-sse #required because of an error in recent ffmpeg version in case of -bf > 0 |
11 |
CONFIG_FFMPEG += --enable-gpl |
12 |
CONFIG_FFMPEG += --disable-doc #for less build dependecies and faster build |
13 |
ifeq ($(HOSTARCH),mingw32) |
14 |
CONFIG_FFMPEG += --arch=i586 --enable-cross-compile --cross-prefix=i586-mingw32msvc- --target-os=mingw32 --enable-memalign-hack --disable-pthreads |
15 |
else |
16 |
CONFIG_FFMPEG += --enable-pthreads |
17 |
CONFIG_FFMPEG += --enable-libx264 |
18 |
CONFIG_FFMPEG_CFLAGS += -I$(THIRDPARTYLIBS)/x264-install/include |
19 |
CONFIG_FFMPEG_LDFLAGS += -L$(THIRDPARTYLIBS)/x264-install/lib |
20 |
CONFIG_FFMPEG += --enable-libvorbis |
21 |
CONFIG_FFMPEG_CFLAGS += -I$(THIRDPARTYLIBS)/libvorbis-install/include |
22 |
CONFIG_FFMPEG_LDFLAGS += -L$(THIRDPARTYLIBS)/libvorbis-install/lib |
23 |
CONFIG_FFMPEG_CFLAGS += -I$(THIRDPARTYLIBS)/libogg-install/include |
24 |
CONFIG_FFMPEG_LDFLAGS += -L$(THIRDPARTYLIBS)/libogg-install/lib |
25 |
CONFIG_FFMPEG += --enable-libmp3lame |
26 |
CONFIG_FFMPEG_CFLAGS += -I$(THIRDPARTYLIBS)/mp3lame-install/include |
27 |
CONFIG_FFMPEG_LDFLAGS += -L$(THIRDPARTYLIBS)/mp3lame-install/lib |
28 |
endif |
29 |
CONFIG_FFMPEG += --extra-cflags='$(CONFIG_FFMPEG_CFLAGS)' |
30 |
CONFIG_FFMPEG += --extra-ldflags='$(CONFIG_FFMPEG_LDFLAGS)' |
31 |
|
32 |
ifeq ($(HOSTARCH),mingw32) |
33 |
FLAGS_GRAPES += ARCH=win32 |
34 |
ALTO_OPTION = ALTO=0 |
35 |
endif |
36 |
|
37 |
WGET_OR_CURL = $(shell which wget || echo "curl -O -L") |
38 |
|
39 |
.PHONY: GRAPES-build NAPA-build all |
40 |
|
41 |
all: GRAPES-build NAPA-build |
42 |
|
43 |
ifndef NOGIT |
44 |
x264/$(GITREPOCHECK) ffmpeg/$(GITREPOCHECK) GRAPES/$(GITREPOCHECK) NAPA-BASELIBS/$(GITREPOCHECK): |
45 |
cd .. && git submodule init $(THIRDPARTYLIBS)/$(@:/$(GITREPOCHECK)=) |
46 |
cd .. && git submodule update $(THIRDPARTYLIBS)/$(@:/$(GITREPOCHECK)=) |
47 |
|
48 |
x264/config.mak: x264/$(GITREPOCHECK) |
49 |
|
50 |
ffmpeg/config.mak: ffmpeg/$(GITREPOCHECK) |
51 |
|
52 |
GRAPES-build: GRAPES/$(GITREPOCHECK) |
53 |
|
54 |
NAPA-build: NAPA-BASELIBS/$(GITREPOCHECK) |
55 |
endif |
56 |
|
57 |
x264/config.mak: |
58 |
cd x264 && ./configure --disable-lavf --prefix=$(THIRDPARTYLIBS)/x264-install/ || { echo "Error configuring x264" && exit 1; } |
59 |
|
60 |
x264-install: x264/config.mak |
61 |
$(MAKE) -C x264 || { echo "Error compiling x264" && exit 1; } |
62 |
$(MAKE) -C x264 install || { echo "Error installing x264" && exit 1; } |
63 |
touch x264-install |
64 |
|
65 |
libogg: |
66 |
$(WGET_OR_CURL) 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 |
67 |
|
68 |
libogg-install: libogg |
69 |
cd libogg && ./configure --disable-oggtest --disable-shared --prefix=$(THIRDPARTYLIBS)/libogg-install/ && make && make install |
70 |
|
71 |
libvorbis: |
72 |
$(WGET_OR_CURL) 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 |
73 |
|
74 |
libvorbis-install: libvorbis libogg-install |
75 |
cd libvorbis && ./configure --disable-oggtest --disable-shared --prefix=$(THIRDPARTYLIBS)/libvorbis-install/ --with-ogg=$(THIRDPARTYLIBS)/libogg-install/ && make && make install |
76 |
|
77 |
mp3lame: |
78 |
$(WGET_OR_CURL) 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; |
79 |
|
80 |
mp3lame-install: mp3lame |
81 |
cd mp3lame && ./configure --disable-gtktest --disable-frontend --disable-shared --prefix=$(THIRDPARTYLIBS)/mp3lame-install/ ${HOSTARCH:+--host=$HOSTARCH} && make && make install |
82 |
|
83 |
ifneq ($(HOSTARCH),mingw32) |
84 |
ffmpeg/config.mak: x264-install libvorbis-install libogg-install mp3lame-install |
85 |
endif |
86 |
ffmpeg/config.mak: |
87 |
cd ffmpeg && ./configure --prefix=$(THIRDPARTYLIBS)/ffmpeg-install $(CONFIG_FFMPEG) || { echo "Error configuring ffmpeg" && exit 1; } |
88 |
#in case x264 is not reqired (do we need the encoding?): ./configure --enable-gpl --enable-pthreads --prefix=$BASEDIR/ffmpeg-install |
89 |
|
90 |
ffmpeg-install: ffmpeg/config.mak |
91 |
$(MAKE) -C ffmpeg || { echo "Error compiling ffmpeg" && exit 1; } |
92 |
$(MAKE) -C ffmpeg install || { echo "Error installing ffmpeg" && exit 1; } |
93 |
touch ffmpeg-install |
94 |
|
95 |
GRAPES-build: ffmpeg-install |
96 |
$(FLAGS_GRAPES) FFDIR=$(THIRDPARTYLIBS)/ffmpeg $(MAKE) -C GRAPES || { echo "Error compiling GRAPES" && exit 1; } |
97 |
|
98 |
NAPA-build: |
99 |
cd NAPA-BASELIBS && $(ALTO_OPTION) ./build_all.sh -q |
100 |
|
101 |
clean: |
102 |
$(MAKE) -C GRAPES clean |
103 |
$(MAKE) -C NAPA-BASELIBS clean |