Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
80411c61
Commit
80411c61
authored
Apr 09, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add build files for overture
parent
adb7285d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
0 deletions
+102
-0
.gitignore
.gitignore
+12
-0
.gitmodules
.gitmodules
+6
-0
mobile/src/overture/go
mobile/src/overture/go
+1
-0
mobile/src/overture/make.bash
mobile/src/overture/make.bash
+82
-0
mobile/src/overture/src/github.com/shadowsocks/overture
mobile/src/overture/src/github.com/shadowsocks/overture
+1
-0
No files found.
.gitignore
View file @
80411c61
...
...
@@ -10,3 +10,15 @@ local.sbt
mobile/src/main/libs
mobile/src/main/obj
mobile/src/main/jni/overture
mobile/src/overture/.deps
mobile/src/overture/bin
mobile/src/overture/pkg
mobile/src/overture/src/github.com/Sirupsen
mobile/src/overture/src/github.com/mattn
mobile/src/overture/src/github.com/miekg
mobile/src/overture/src/github.com/shawn1m
mobile/src/overture/src/github.com/tools
mobile/src/overture/src/golang.org
mobile/src/overture/src/gopkg.in
.gitmodules
View file @
80411c61
...
...
@@ -33,3 +33,9 @@
[submodule "mobile/src/main/jni/libudns"]
path = mobile/src/main/jni/libudns
url = https://github.com/shadowsocks/libudns.git
[submodule "mobile/src/overture/go"]
path = mobile/src/overture/go
url = https://github.com/shadowsocks/go.git
[submodule "mobile/src/overture/src/github.com/shadowsocks/overture"]
path = mobile/src/overture/src/github.com/shadowsocks/overture
url = https://github.com/shadowsocks/overture.git
go
@
86036dcc
Subproject commit 86036dcce8fc7e2bd772969e6af56776cc9d8d53
mobile/src/overture/make.bash
0 → 100755
View file @
80411c61
#!/bin/bash
function
try
()
{
"
$@
"
||
exit
-1
}
[
-z
"
$ANDROID_NDK_HOME
"
]
&&
ANDROID_NDK_HOME
=
~/android-ndk-r12b
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
MIN_API
=
$1
TARGET
=
$DIR
/../main/jni/overture
DEPS
=
$DIR
/.deps
ANDROID_ARM_TOOLCHAIN
=
$DEPS
/android-toolchain-
${
MIN_API
}
-arm
ANDROID_ARM64_TOOLCHAIN
=
$DEPS
/android-toolchain-21-arm64
ANDROID_X86_TOOLCHAIN
=
$DEPS
/android-toolchain-
${
MIN_API
}
-x86
ANDROID_ARM_CC
=
$ANDROID_ARM_TOOLCHAIN
/bin/arm-linux-androideabi-gcc
ANDROID_ARM_STRIP
=
$ANDROID_ARM_TOOLCHAIN
/bin/arm-linux-androideabi-strip
ANDROID_ARM64_CC
=
$ANDROID_ARM64_TOOLCHAIN
/bin/aarch64-linux-android-gcc
ANDROID_ARM64_STRIP
=
$ANDROID_ARM64_TOOLCHAIN
/bin/aarch64-linux-android-strip
ANDROID_X86_CC
=
$ANDROID_X86_TOOLCHAIN
/bin/i686-linux-android-gcc
ANDROID_X86_STRIP
=
$ANDROID_X86_TOOLCHAIN
/bin/i686-linux-android-strip
try
mkdir
-p
$DEPS
$TARGET
/armeabi-v7a
$TARGET
/x86
$TARGET
/arm64-v8a
if
[
!
-d
"
$ANDROID_ARM_TOOLCHAIN
"
]
;
then
echo
"Make standalone toolchain for ARM arch"
$ANDROID_NDK_HOME
/build/tools/make_standalone_toolchain.py
--arch
arm
\
--api
$MIN_API
--install-dir
$ANDROID_ARM_TOOLCHAIN
fi
if
[
!
-d
"
$ANDROID_ARM64_TOOLCHAIN
"
]
;
then
echo
"Make standalone toolchain for ARM64 arch"
$ANDROID_NDK_HOME
/build/tools/make_standalone_toolchain.py
--arch
arm64
\
--api
21
--install-dir
$ANDROID_ARM64_TOOLCHAIN
fi
if
[
!
-d
"
$ANDROID_X86_TOOLCHAIN
"
]
;
then
echo
"Make standalone toolchain for X86 arch"
$ANDROID_NDK_HOME
/build/tools/make_standalone_toolchain.py
--arch
x86
\
--api
$MIN_API
--install-dir
$ANDROID_X86_TOOLCHAIN
fi
if
[
!
-d
"
$DIR
/go/bin"
]
;
then
echo
"Build the custom go"
pushd
$DIR
/go/src
try ./make.bash
popd
fi
export
GOROOT
=
$DIR
/go
export
GOPATH
=
$DIR
export
PATH
=
$GOROOT
/bin:
$GOPATH
/bin:
$PATH
echo
"Get dependences for overture"
go get
-u
github.com/tools/godep
pushd
$GOPATH
/src/github.com/shadowsocks/overture/main
godep restore
echo
"Cross compile overture for arm"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM_CC
GOOS
=
android
GOARCH
=
arm
GOARM
=
7 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM_STRIP
main
try
mv
main
$TARGET
/armeabi-v7a/liboverture.so
echo
"Cross compile overture for arm64"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM64_CC
GOOS
=
android
GOARCH
=
arm64 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM64_STRIP
main
try
mv
main
$TARGET
/arm64-v8a/liboverture.so
echo
"Cross compile overture for x86"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_X86_CC
GOOS
=
android
GOARCH
=
386 go build
-ldflags
=
"-s -w"
try
$ANDROID_X86_STRIP
main
try
mv
main
$TARGET
/x86/liboverture.so
popd
echo
"Successfully build overture"
overture
@
7263b82d
Subproject commit 7263b82d2eba2e28d70766aed36ffbc7cf0e1451
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