forked from nschlia/ffmpegfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkjenkins
executable file
·82 lines (69 loc) · 1.88 KB
/
mkjenkins
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
#!/bin/bash
#COMPILER=gcc
#TOOLKIT=ffmpeg
#FFMPEGVER=4.1
#CONFIGUREOPT=
COMPILER=$1
TOOLKIT=$2
FFMPEGVER=$3
CONFIGUREOPT=$4
if [ -z "${COMPILER}" ] || [ -z "${TOOLKIT}" ]
then
echo "Usage: mkjenkins COMPILER TOOLKIT [FFMPEGVER] [CONFIGIVERSION]"
echo
echo "Set toolkit to 'native' to install to system"
echo
echo "Example: mkjenkins gcc native"
exit 0
fi
if [ -z ${CONFIGUREOPT} ];
then
echo "Building for ${TOOLKIT} ${FFMPEGVER} with ${COMPILER}"
else
echo "Building for ${TOOLKIT} ${FFMPEGVER} with ${COMPILER} (configure ${CONFIGUREOPT})"
fi
if [ ${TOOLKIT} != "native" ];
then
FFMPEG_BUILD="${HOME}/dev/builds/${TOOLKIT}"
if [ ! -z "$FFMPEGVER" ]
then
FFMPEG_BUILD="${FFMPEG_BUILD}-${FFMPEGVER}"
fi
if [ ! -d ${FFMPEG_BUILD} ];
then
echo "*** ERROR *** FFmpeg not found in ${FFMPEG_BUILD}"
exit 99
fi
echo "Using FFmpeg in ${FFMPEG_BUILD}"
# 32+64 bit
#export LIB32="${FFMPEG_BUILD}/lib"
#export LIB64="${FFMPEG_BUILD}/lib64"
#export LD_LIBRARY_PATH="${LIB64}:${LIB32}"
#export LDFLAGS="-L${LIB64} -L${LIB32} -Wl,-rpath,${LD_LIBRARY_PATH}"
#export PKG_CONFIG_PATH="${FFMPEG_BUILD}/lib/pkgconfig:${FFMPEG_BUILD}/lib64/pkgconfig"
# 64 bit only
export LIB="${FFMPEG_BUILD}/lib"
export LD_LIBRARY_PATH="${LIB}"
export LDFLAGS="-L${LIB} -Wl,-rpath,${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="${FFMPEG_BUILD}/lib/pkgconfig"
export CPLUS_INCLUDE_PATH="${FFMPEG_BUILD}/include"
export CFLAGS=-I"${FFMPEG_BUILD}/include"
export CPPFLAGS=-I"${FFMPEG_BUILD}/include"
else
echo "Using native FFmpeg library"
fi
rm -Rf autom4te.cache config
./autogen.sh
if [ ${COMPILER} = "clang" ];
then
echo "Using clang"
CC=clang CXX=clang++ ./configure ${CONFIGUREOPT}
elif [ ${COMPILER} = "gcc" ];
then
echo "Using gcc"
CC=gcc CXX="g++" ./configure ${CONFIGUREOPT}
else
echo "Using default compiler"
./configure ${CONFIGUREOPT}
fi
make -s clean all check