From 404e635665f0626bd8030d467ca4629600de1ac0 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Wed, 12 Nov 2014 22:16:32 +0000 Subject: [PATCH] Fixed Android build --- android_build/jni/Android.mk | 12 ------------ docs/AndroidBuild.md | 2 +- jni/Android.mk | 8 ++++++++ 3 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 android_build/jni/Android.mk create mode 100644 jni/Android.mk diff --git a/android_build/jni/Android.mk b/android_build/jni/Android.mk deleted file mode 100644 index 4f771327..00000000 --- a/android_build/jni/Android.mk +++ /dev/null @@ -1,12 +0,0 @@ -LOCAL_PATH := $(call my-dir)/../.. -include $(CLEAR_VARS) - -# To build with lua support, uncomment two lines below: -#LUA_SOURCES := build/lua_5.2.1.c build/sqlite3.c build/lsqlite3.c -#LUA_FLAGS := -I$(LOCAL_PATH)/build -DTHREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DUSE_LUA -DUSE_LUA_SQLITE3 -DLUA_COMPAT_ALL -D"getlocaledecpoint() ='.'" - -LOCAL_CFLAGS := -std=c99 -O2 -W -Wall -pthread -pipe $(LUA_FLAGS) $(COPT) -LOCAL_MODULE := mongoose -LOCAL_SRC_FILES := examples/server.c mongoose.c $(LUA_SOURCES) - -include $(BUILD_EXECUTABLE) diff --git a/docs/AndroidBuild.md b/docs/AndroidBuild.md index ee4ad6a1..afd21522 100644 --- a/docs/AndroidBuild.md +++ b/docs/AndroidBuild.md @@ -7,7 +7,7 @@ Note : You dont need root access to run mongoose on Android. - Clone Mongoose Git repo - Download the Android NDK from [http://developer.android.com/tools/sdk/ndk/index.html](http://developer.android.com/tools/sdk/ndk/index.html) -- Run `/path-to-ndk/ndk-build -C /path-to-mongoose/examples` +- Run `/path-to-ndk/ndk-build -C /path/to/mongoose` That should generate mongoose/lib/armeabi/mongoose - Using the adb tool (you need to have Android SDK installed for that), push the generated mongoose binary to `/data/local` folder on device. diff --git a/jni/Android.mk b/jni/Android.mk new file mode 100644 index 00000000..3a7daa06 --- /dev/null +++ b/jni/Android.mk @@ -0,0 +1,8 @@ +LOCAL_PATH := $(call my-dir)/.. +include $(CLEAR_VARS) + +LOCAL_CFLAGS := -std=c99 -O2 -W -Wall -pthread -pipe $(COPT) +LOCAL_MODULE := mongoose +LOCAL_SRC_FILES := examples/web_server/web_server.c mongoose.c + +include $(BUILD_EXECUTABLE)