-
Notifications
You must be signed in to change notification settings - Fork 127
/
configure.nacl
executable file
·111 lines (88 loc) · 2.12 KB
/
configure.nacl
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
#!/bin/bash
#
# HTS configure script for PS3 with PSL1GHT toolchain
#
# Copyright (c) 2011 Andreas Öman
#
# Based on FFmpeg's configure script:
#
# Copyright (c) 2000-2002 Fabrice Bellard
# Copyright (c) 2005-2008 Diego Biurrun
# Copyright (c) 2005-2008 Mans Rullgard
#
PLATFORM="nacl"
DEFAULT_UI="glw"
CONFIGURE_POSTFIX="nacl"
source support/configure.inc
LIBAV_CFLAGS=""
LIBAV_ARCH_FLAGS=""
show_help(){
common_help
exit 1
}
enable sqlite_internal
enable libfreetype
enable trex
enable emu_thread_specifics
enable glw
enable polarssl
enable httpserver
enable sqlite_vfs
enable sqlite_locking
enable glw_backend_opengl_es
enable vmir
disable ftpserver
disable netlog
[ -f project.config ] && source project.config
for opt do
optval="${opt#*=}"
case "$opt" in
--help) show_help
;;
--logtarget=*) DEFAULT_LOGTARGET="$optval"
;;
--pepper=*) PEPPER="$optval"
;;
--host=*) HOST="$optval"
;;
*)
common_opt $opt $optval
esac
done
if [ -z "${PEPPER}" ]; then
echo " --pepper=PATH argument missing"
exit 1
fi
KNAME=`uname -s`
if [ "$KNAME" == "Linux" ]; then
HOSTENV=linux
elif [ "$KNAME" == "Darwin" ]; then
HOSTENV=mac
else
echo "NACL cross compile not supported on this platform"
exit 1
fi
TOOLCHAIN=${PEPPER}/toolchain/${HOSTENV}_pnacl/bin/pnacl-
CC=${TOOLCHAIN}clang
FINALIZE=${TOOLCHAIN}finalize
CXX=${TOOLCHAIN}clang++
setup_env "$@"
LIBAV_CFLAGS="-I${EXT_INSTALL_DIR}/include"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=i686 --target-os=linux --disable-asm --disable-inline-asm --disable-programs --disable-ssse3 --disable-mmx --disable-mmxext --disable-amd3dnow --disable-amd3dnowext"
zlib_setup
bzip2_setup
freetype_setup --host=i686-none-nacl
libav_setup
bzip2_setup
if enabled release; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -L${PEPPER}/lib/pnacl/Release"
else
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -L${PEPPER}/lib/pnacl/Debug"
fi
cat >> ${CONFIG_MAK} <<EOF
FINALIZE = ${FINALIZE}
CFLAGS_cfg += -I${PEPPER}/include -D_FILE_OFFSET_BITS=64
LDFLAGS_cfg += -lppapi_gles2 -lppapi -lpthread
EOF
finalize