forked from andoma/movian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sunxi
executable file
·123 lines (88 loc) · 2.9 KB
/
configure.sunxi
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/bash
PLATFORM="sunxi"
DEFAULT_UI="glw"
CONFIGURE_POSTFIX="sunxi"
source support/configure.inc
show_help(){
common_help
exit 1
}
for opt do
optval="${opt#*=}"
case "$opt" in
--help) show_help
;;
--toolchain=*) TOOLCHAIN="$optval"
;;
--sysroot=*) SYSROOT="$optval"
;;
*)
common_opt $opt $optval
esac
done
[ -z "$TOOLCHAIN" ] && die_cause "--toolchain not specified"
CC=${TOOLCHAIN}gcc
CXX=${TOOLCHAIN}g++
setup_env "$@"
enable sqlite_internal
enable glw_backend_opengl_es
enable glw
#enable polarssl
#enable librtmp
enable httpserver
#enable dvd
enable libfreetype
enable stdin
enable realpath
enable bspatch
enable sunxi
enable cedar
LIBAV_CFLAGS="-I${EXT_INSTALL_DIR}/include"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=arm --target-os=linux --enable-neon"
if [ -n "$SYSROOT" ]; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += --sysroot=$SYSROOT"
echo >>${CONFIG_MAK} "CFLAGS_cfg += --sysroot=$SYSROOT"
LIBAV_CFLAGS="--sysroot=$SYSROOT ${LIBAV_CFLAGS}"
LIBAV_LDFLAGS="--sysroot=$SYSROOT ${LIBAV_LDFLAGS}"
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
export PKG_CONFIG_LIBDIR="$SYSROOT/usr/lib/pkgconfig"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs zlib`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags zlib`
echo "Using zlib: `pkg-config --modversion zlib`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs freetype2`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags freetype2`
echo "Using freetype: `pkg-config --modversion freetype2`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs gio-2.0`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags gio-2.0`
echo "Using gio: `pkg-config --modversion gio-2.0`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs alsa`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags alsa`
echo "Using ALSA: `pkg-config --modversion alsa`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs openssl`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags openssl`
echo "Using OpenSSL: `pkg-config --modversion openssl`"
enable openssl
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -lbz2"
enable connman
else
zlib_setup
bzip2_setup
freetype_setup --host=arm-linux-gnueabihf
fi
libav_setup
rtmpdump_setup
xmp_setup
gumbo_setup
cat >> ${CONFIG_MAK} <<EOF
CFLAGS_cfg += -funwind-tables
CFLAGS_cfg += -I${TOPDIR}/support/sunxi/libv/include
LDFLAGS_cfg += -L${TOPDIR}/support/sunxi/libv/lib
LDFLAGS_cfg += -lvecore
CFLAGS_cfg += -I${TOPDIR}/support/sunxi/mali/include
LDFLAGS_cfg += -L${TOPDIR}/support/sunxi/mali/lib
LDFLAGS_cfg += -lEGL -lGLESv2 -lUMP -lMali
LDFLAGS_cfg += -lpthread -lrt -ldl
EOF
echo >>${CONFIG_H} "#define SHOWTIME_LIBDIR \"/stos/mnt/showtime/lib\""
finalize