mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-23 15:02:27 +00:00
Fix various Android NDK build issues
(specify endianness, copy libsqlite.so from an Android phone for link templating)
This commit is contained in:
parent
b775e48042
commit
d5004e15d2
@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_LDLIBS := -lsqlite
|
||||
LOCAL_LDLIBS := -L$(LOCAL_PATH) -lsqlite
|
||||
LOCAL_SRC_FILES:= \
|
||||
client.c \
|
||||
export.c \
|
||||
@ -28,6 +28,7 @@ LOCAL_SRC_FILES:= \
|
||||
randombytes.c \
|
||||
simulate.c \
|
||||
jni.c \
|
||||
sha2.c \
|
||||
rhizome.c
|
||||
|
||||
LOCAL_MODULE:= dnalib
|
||||
|
@ -33,3 +33,13 @@ sources=`echo nacl-source/*/nacl-source/*/*.c`
|
||||
echo sed -e 's,LOCAL_SRC_FILES:= \\,LOCAL_SRC_FILES:= '"${sources}"' \\,'
|
||||
cat Android-without-NaCl.mk | sed -e 's,LOCAL_SRC_FILES:= \\,LOCAL_SRC_FILES:= '"${sources}"' \\,' > Android.mk
|
||||
|
||||
# Copy libsqlite.so from /system/lib/ on an android phone.
|
||||
phonecount=`adb devices | wc -l`
|
||||
if [ ${phonecount} -lt 3 ]; then
|
||||
echo "ERROR: You MUST connect and Android phone with USB debugging enabled"
|
||||
echo " so that I can copy /system/lib/libsqlite.so to link against."
|
||||
exit 3
|
||||
fi
|
||||
dev=`adb devices | awk '($1>"") { n=$1;} END { print n;}'`
|
||||
echo "Copying /system/lib/sqlite.so from device $dev"
|
||||
adb -s $dev pull /system/lib/libsqlite.so
|
||||
|
Loading…
Reference in New Issue
Block a user