Browse Source

new build config to have debug on Android Studio

JNI-26
Hussein Kasem 5 years ago
parent
commit
89fdaf6fa8
5 changed files with 16 additions and 13 deletions
  1. +1
    -1
      build-android/build.sh
  2. +8
    -10
      build-android/jni/Android.mk
  3. +4
    -0
      build-android/jni/Application.mk
  4. +2
    -1
      src/platform_unix.c
  5. +1
    -1
      src/platform_unix.h

+ 1
- 1
build-android/build.sh View File

@ -6,7 +6,7 @@
set -e
build_version=1
ANDROID_PLATFORM=android-21
ANDROID_PLATFORM=android-18
libetpan_build_version=1
archs="armeabi armeabi-v7a x86 x86_64"
package_name=pEpEngine-android


+ 8
- 10
build-android/jni/Android.mk View File

@ -2,9 +2,10 @@
#
# This file is under GNU General Public License 3.0
# see LICENSE.txt
LOCAL_PATH := $(call my-dir)
$(warning $(LOCAL_PATH))
LIBETPAN_PATH:= $(LOCAL_PATH)/../../../pEpJNIAdapter/android/external/libetpan/build-android
GPGME_INCLUDE_PATH:= $(LOCAL_PATH)/../../../pEpJNIAdapter/android/external/data/data/pep.android.k9/app_opt/include
include $(CLEAR_VARS)
@ -19,10 +20,6 @@ endif
LOCAL_MODULE := pEpEngine
LOCAL_CFLAGS += -std=c99
ifneq ($(NDEBUG),)
LOCAL_CFLAGS += -DNDEBUG=1
endif
# from http://www.sqlite.org/android/finfo?name=jni/sqlite/Android.mk
# http://www.sqlite.org/android/artifact/e8ed354b3e58c835
@ -32,13 +29,14 @@ endif
#
LOCAL_CFLAGS += -DSQLITE_TEMP_STORE=3
LOCAL_C_INCLUDES := ../../src \
../../asn.1 \
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../src \
$(LOCAL_PATH)/../../asn.1 \
$(GPGME_INCLUDE_PATH) \
$(LIBETPAN_PATH)/include
ENGINE_SRC_FILES := $(shell find ../../src/ ! -name "*netpgp*" -name "*.c")
LOCAL_C_INCLUDES += $(GPGBUILD)/include
ENGINE_SRC_FILES := $(shell find $(LOCAL_PATH)/../../src/ ! -name "*netpgp*" -name "*.c")
#ENGINE_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.c)
$(warning $(ENGINE_SRC_FILES))
ASN1_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../asn.1/*.c)
LOCAL_SRC_FILES := $(ENGINE_SRC_FILES:%=%) $(ASN1_SRC_FILES:$(LOCAL_PATH)/%=%)


+ 4
- 0
build-android/jni/Application.mk View File

@ -0,0 +1,4 @@
APP_OPTIM := debug
APP_PLATFORM=android-21
APP_ABI := armeabi-v7a
NDK_TOOLCHAIN_VERSION = 4.8

+ 2
- 1
src/platform_unix.c View File

@ -77,6 +77,7 @@ char *stpcpy(char *dst, const char *src)
return dst;
}
/*
long int random(void)
{
static bool seeded = false;
@ -91,7 +92,7 @@ long int random(void)
}
return nrand48(xsubi);
}
} */
const char *android_system_db(void)
{


+ 1
- 1
src/platform_unix.h View File

@ -35,7 +35,7 @@ char *stpcpy(char *, const char *);
// Beware: predictable pseudo random with static seed!
// Only the lowest 31 bits are filled randomly.
long int random(void);
//long int random(void);
const char *android_system_db(void);
#define SYSTEM_DB android_system_db()


Loading…
Cancel
Save