Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
3b242ec6
Commit
3b242ec6
authored
11 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Added Android makefile
parent
74091664
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
UserManual.md
+7
-21
7 additions, 21 deletions
UserManual.md
build/jni/Android.mk
+6
-0
6 additions, 0 deletions
build/jni/Android.mk
with
13 additions
and
21 deletions
UserManual.md
+
7
−
21
View file @
3b242ec6
...
@@ -453,25 +453,11 @@ as well, please comment or drop an email in the mailing list.
...
@@ -453,25 +453,11 @@ as well, please comment or drop an email in the mailing list.
Note : You dont need root access to run mongoose on Android.
Note : You dont need root access to run mongoose on Android.
-
Download the source from the Downloads page.
-
Download the source from the Downloads page.
-
Download the Android NDK from
-
Download the Android NDK from
[
http://developer.android.com/tools/sdk/ndk/index.html
](
http://developer.android.com/tools/sdk/ndk/index.html
)
[
here
](
http://developer.android.com/tools/sdk/ndk/index.html
)
-
Run
`/path-to-ndk/ndk-build -C /path-to-mongoose/build`
-
Make a folder (e.g. mongoose) and inside that make a folder named "jni".
That should generate mongoose/lib/armeabi/mongoose
-
Add
`mongoose.h`
,
`mongoose.c`
and
`main.c`
from the source to the jni folder.
-
Using the adb tool (you need to have Android SDK installed for that),
-
Make a new file in the jni folder named "Android.mk".
push the generated mongoose binary to
`/data/local`
folder on device.
This is the make file for ndk-build.
Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := mongoose
LOCAL_SRC_FILES := main.c mongoose.c
include $(BUILD_EXECUTABLE)
-
Run
`./ndk-build -C /path/to/mongoose/`
.
This should generate mongoose/lib/armeabi/mongoose
-
Using the adb tool, push the generated mongoose binary to
`/data/local`
folder on device.
-
From adb shell, navigate to
`/data/local`
and execute
`./mongoose`
.
-
From adb shell, navigate to
`/data/local`
and execute
`./mongoose`
.
-
To test if the server is running fine, visit your web-browser and
-
To test if the server is running fine, visit your web-browser and
navigate to
`http://127.0.0.1:8080`
You should see the
`Index of /`
page.
navigate to
`http://127.0.0.1:8080`
You should see the
`Index of /`
page.
...
@@ -480,10 +466,10 @@ Android.mk:
...
@@ -480,10 +466,10 @@ Android.mk:
Notes:
Notes:
-
jni stands for Java Native Interface. Read up on Android NDK if you want
-
`jni`
stands for Java Native Interface. Read up on Android NDK if you want
to know how to interact with the native C functions of mongoose in Android
to know how to interact with the native C functions of mongoose in Android
Java applications.
Java applications.
-
Download android-sdk for the adb tool.
-
TODO: A Java application that interacts with the native binary or a
-
TODO: A Java application that interacts with the native binary or a
shared library.
shared library.
...
...
This diff is collapsed.
Click to expand it.
build/jni/Android.mk
0 → 100644
+
6
−
0
View file @
3b242ec6
LOCAL_PATH
:=
$(
call my-dir
)
/../..
include
$(CLEAR_VARS)
LOCAL_CFLAGS
:=
-std
=
c99
-O2
-W
-Wall
-pthread
-pipe
$(
COPT
)
LOCAL_MODULE
:=
mongoose
LOCAL_SRC_FILES
:=
main.c mongoose.c
include
$(BUILD_EXECUTABLE)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment