Skip to content

x86 build #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ clean:
ant clean
cd ${EXTERNAL_DIR} && ndk-build clean
-cd ${SQLCIPHER_DIR} && make clean
cd ${JNI_DIR} && ndk-build clean
cd ${JNI_DIR} && ndk-build clean
-rm ${LIBRARY_ROOT}/armeabi/libsqlcipher_android.so
-rm ${LIBRARY_ROOT}/armeabi/libdatabase_sqlcipher.so
-rm ${LIBRARY_ROOT}/armeabi/libstlport_shared.so
-rm ${LIBRARY_ROOT}/sqlcipher.jar
-rm ${LIBRARY_ROOT}/x86/libsqlcipher_android.so
-rm ${LIBRARY_ROOT}/x86/libdatabase_sqlcipher.so
-rm ${LIBRARY_ROOT}/x86/libstlport_shared.so

copy-libs:
mkdir -p ${LIBRARY_ROOT}/armeabi
Expand All @@ -44,6 +48,13 @@ copy-libs:
cp ${CURDIR}/bin/classes/sqlcipher.jar ${LIBRARY_ROOT} && \
cp ${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so \
${LIBRARY_ROOT}/armeabi
mkdir -p ${LIBRARY_ROOT}/x86
cp ${EXTERNAL_DIR}/libs/x86/libsqlcipher_android.so \
${LIBRARY_ROOT}/x86 && \
cp ${JNI_DIR}/libs/x86/libdatabase_sqlcipher.so \
${LIBRARY_ROOT}/x86 && \
cp ${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/x86/libstlport_shared.so \
${LIBRARY_ROOT}/x86

copy-libs-dist:
cp ${LIBRARY_ROOT}/*.jar dist/SQLCipherForAndroid-SDK/libs/ && \
Expand Down
7 changes: 4 additions & 3 deletions external/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sqlcipher/sqlite3.c:
copy-libs-hack: build-local-hack
install -p -m644 libs/armeabi/*.so ../obj/local/armeabi/

project_ldflags:= -Llibs/armeabi/ -Landroid-libs/
project_ldflags:= -Llibs/$(TARGET_ARCH_ABI)/ -Landroid-libs/$(TARGET_ARCH_ABI)/

#------------------------------------------------------------------------------#
# libsqlite3
Expand Down Expand Up @@ -75,7 +75,8 @@ LOCAL_ALLOW_UNDEFINED_SYMBOLS := false
#LOCAL_REQUIRED_MODULES += libsqlcipher libicui18n libicuuc
LOCAL_STATIC_LIBRARIES := libsqlcipher libicui18n libicuuc

LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlite_cflags) -DOS_PATH_SEPARATOR="'/'"
LOCAL_CFLAGS += $(android_sqlite_cflags) $(sqlite_cflags) \
-DOS_PATH_SEPARATOR="'/'" -DHAVE_SYS_UIO_H

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/includes \
Expand All @@ -85,7 +86,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/platform-system-core/include \
$(LOCAL_PATH)/platform-frameworks-base/include

LOCAL_LDFLAGS += -L$(LOCAL_PATH)/android-libs/ -L$(LOCAL_PATH)/libs/armeabi/
LOCAL_LDFLAGS += -L${LOCAL_PATH}/android-libs/$(TARGET_ARCH_ABI)/ -L$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/
LOCAL_LDLIBS := -llog -lutils -lcutils -lcrypto
LOCAL_MODULE := libsqlcipher_android
LOCAL_MODULE_FILENAME := libsqlcipher_android
Expand Down
2 changes: 1 addition & 1 deletion external/String16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# define htons(x) (x)
# endif
#else
//# include <netinet/in.h>
# include <netinet/in.h>
# include <sys/endian.h>
#endif

Expand Down
File renamed without changes.
Binary file added external/android-libs/x86/libandroid_runtime.so
Binary file not shown.
Binary file added external/android-libs/x86/libbinder.so
Binary file not shown.
Binary file added external/android-libs/x86/libcrypto.so
Binary file not shown.
Binary file added external/android-libs/x86/libcutils.so
Binary file not shown.
Binary file added external/android-libs/x86/liblog.so
Binary file not shown.
Binary file added external/android-libs/x86/libnativehelper.so
Binary file not shown.
Binary file added external/android-libs/x86/libutils.so
Binary file not shown.
Binary file added external/android-libs/x86/libz.so
Binary file not shown.
8 changes: 2 additions & 6 deletions jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ LOCAL_PATH:= $(call my-dir)

EXTERNAL_PATH := ../external

ifeq ($(TARGET_ARCH), arm)
LOCAL_CFLAGS += -DPACKED="__attribute__ ((packed))"
else
LOCAL_CFLAGS += -DPACKED=""
endif
LOCAL_CFLAGS += -DPACKED="__attribute__ ((packed))"

#TARGET_PLATFORM := android-8

Expand Down Expand Up @@ -49,7 +45,7 @@ LOCAL_SHARED_LIBRARIES := \
libsqlite3_android

LOCAL_CFLAGS += -U__APPLE__
LOCAL_LDFLAGS += -L../external/android-libs/ -L../external/libs/armeabi/
LOCAL_LDFLAGS += -L../external/android-libs/$(TARGET_ARCH_ABI) -L../external/libs/$(TARGET_ARCH_ABI)/

# libs from the NDK
LOCAL_LDLIBS += -ldl -llog
Expand Down
1 change: 1 addition & 0 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
APP_PROJECT_PATH := $(shell pwd)
APP_ABI := armeabi x86
APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/Android.mk
# fixes this error when building external/android-sqlite/android/sqlite3_android.cpp
# icu4c/common/unicode/std_string.h:39:18: error: string: No such file or directory
Expand Down