Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lei Li
agent-shell
Commits
b9d71c13
Commit
b9d71c13
authored
Oct 25, 2024
by
“李磊”
Browse files
fix: 安卓下无法编译出静态库
parent
7af85b1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
b9d71c13
...
@@ -10,17 +10,10 @@ arm:
...
@@ -10,17 +10,10 @@ arm:
export
GOARCH
=
arm
GOOS
=
linux
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
arm-linux-gnueabi-gcc
&&
go build
-buildmode
=
c-shared
-o
$(DST)
$(SRC)
export
GOARCH
=
arm
GOOS
=
linux
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
arm-linux-gnueabi-gcc
&&
go build
-buildmode
=
c-shared
-o
$(DST)
$(SRC)
android
:
android
:
export
GOARCH
=
arm
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang
&&
go build
-buildmode
=
c-shared
-o
$(DST)
$(SRC)
export
GOARCH
=
arm
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang
&&
go build
-buildmode
=
c-shared
-tags
netcgo
-o
$(DST)
$(SRC)
android-64
:
android-64
:
export
GOARCH
=
arm64
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang
&&
go build
-buildmode
=
c-shared
-o
$(DST)
$(SRC)
export
GOARCH
=
arm64
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang
&&
go build
-buildmode
=
c-shared
-tags
netcgo
-o
$(DST)
$(SRC)
.PHONY
:
clean
android-static
:
export
GOARCH
=
arm
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang
&&
go build
-buildmode
=
c-shared
-o
$(DST2)
$(SRC)
android-static-64
:
export
GOARCH
=
arm64
GOOS
=
android
GO111MODULE
=
on
CGO_ENABLED
=
1
CC
=
/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang
&&
go build
-buildmode
=
c-shared
-o
$(DST2)
$(SRC)
P.HONY
:
clean
clean
:
clean
:
rm
-f
lib/
*
rm
-f
lib/
*
agent.go
View file @
b9d71c13
...
@@ -15,7 +15,7 @@ import (
...
@@ -15,7 +15,7 @@ import (
)
)
//export start
//export start
func
start
()
{
func
start
(
root
string
)
{
dir
,
err
:=
os
.
Getwd
()
dir
,
err
:=
os
.
Getwd
()
if
err
!=
nil
{
if
err
!=
nil
{
LogError
(
"MainActivity"
,
dir
)
LogError
(
"MainActivity"
,
dir
)
...
@@ -28,6 +28,10 @@ func start() {
...
@@ -28,6 +28,10 @@ func start() {
LogInfo
(
"MainActivity"
,
exePath
)
LogInfo
(
"MainActivity"
,
exePath
)
RootDir
=
GetCurrentDirectory
()
RootDir
=
GetCurrentDirectory
()
if
RootDir
==
"/"
{
RootDir
=
root
}
LogInfo
(
"MainActivity"
,
RootDir
)
msg
:=
""
msg
:=
""
for
{
for
{
if
file
.
Exists
(
filepath
.
Join
(
RootDir
,
agentFileName
))
{
if
file
.
Exists
(
filepath
.
Join
(
RootDir
,
agentFileName
))
{
...
...
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