Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ea552208
Commit
ea552208
authored
Mar 04, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android/build.py: add ABI parameter
parent
e86015a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
build.py
android/build.py
+18
-8
user.xml
doc/user.xml
+8
-1
No files found.
android/build.py
View file @
ea552208
...
...
@@ -3,13 +3,14 @@
import
os
,
os
.
path
import
sys
,
subprocess
if
len
(
sys
.
argv
)
<
3
:
print
(
"Usage: build.py SDK_PATH NDK_PATH [configure_args...]"
,
file
=
sys
.
stderr
)
if
len
(
sys
.
argv
)
<
4
:
print
(
"Usage: build.py SDK_PATH NDK_PATH
ABI
[configure_args...]"
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
sdk_path
=
sys
.
argv
[
1
]
ndk_path
=
sys
.
argv
[
2
]
configure_args
=
sys
.
argv
[
3
:]
android_abi
=
sys
.
argv
[
3
]
configure_args
=
sys
.
argv
[
4
:]
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
sdk_path
,
'tools'
,
'android'
)):
print
(
"SDK not found in"
,
ndk_path
,
file
=
sys
.
stderr
)
...
...
@@ -19,8 +20,18 @@ if not os.path.isdir(ndk_path):
print
(
"NDK not found in"
,
ndk_path
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
android_abis
=
{
'armeabi-v7a'
:
{
'arch'
:
'arm-linux-androideabi'
,
'ndk_arch'
:
'arm'
,
'llvm_triple'
:
'armv7-none-linux-androideabi'
,
'cflags'
:
'-march=armv7-a -mfpu=vfp -mfloat-abi=softfp'
,
},
}
# select the NDK target
arch
=
'arm-linux-androideabi'
abi_info
=
android_abis
[
android_abi
]
arch
=
abi_info
[
'arch'
]
# the path to the MPD sources
mpd_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
])
or
'.'
,
'..'
))
...
...
@@ -44,8 +55,7 @@ class AndroidNdkToolchain:
self
.
src_path
=
src_path
self
.
build_path
=
build_path
ndk_arch
=
'arm'
android_abi
=
'armeabi-v7a'
ndk_arch
=
abi_info
[
'ndk_arch'
]
ndk_platform
=
'android-14'
# select the NDK compiler
...
...
@@ -63,11 +73,11 @@ class AndroidNdkToolchain:
toolchain_path
=
os
.
path
.
join
(
ndk_path
,
'toolchains'
,
arch
+
'-'
+
gcc_version
,
'prebuilt'
,
build_arch
)
llvm_path
=
os
.
path
.
join
(
ndk_path
,
'toolchains'
,
'llvm'
,
'prebuilt'
,
build_arch
)
llvm_triple
=
'armv7-none-linux-androideabi'
llvm_triple
=
abi_info
[
'llvm_triple'
]
common_flags
=
'-Os -g'
common_flags
+=
' -fPIC'
common_flags
+=
'
-march=armv7-a -mfpu=vfp -mfloat-abi=softfp'
common_flags
+=
'
'
+
abi_info
[
'cflags'
]
toolchain_bin
=
os
.
path
.
join
(
toolchain_path
,
'bin'
)
llvm_bin
=
os
.
path
.
join
(
llvm_path
,
'bin'
)
...
...
doc/user.xml
View file @
ea552208
...
...
@@ -303,10 +303,17 @@ apt-get install g++ \
<command>
./configure
</command>
, type:
</para>
<programlisting>
./android/build.py SDK_PATH NDK_PATH
<programlisting>
./android/build.py SDK_PATH NDK_PATH
ABI
make android/build/mpd-debug.apk
</programlisting>
<para>
<varname>
SDK_PATH
</varname>
is the absolute path where you
installed the Android SDK;
<varname>
NDK_PATH
</varname>
is
the Android NDK installation path;
<varname>
ABI
</varname>
is
the Android ABI to be built, e.g. "armeabi-v7a".
</para>
<para>
This downloads various library sources, and then configures
and builds
<application>
MPD
</application>
.
</para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment