build-android/jni/Android.mk
author Edouard Tisserant
Mon, 19 Dec 2016 02:42:41 +0100
changeset 1495 1397da6f9084
parent 685 84b0077c771c
child 1513 e7f7e42385b5
permissions -rw-r--r--
Android build : use environment variable NDEBUG to set preprocessor NDEBUG. NDEBUG env var is set by JNI adapter, in build.gradle when building release
     1 # Copyright (C) 2015 pEp
     2 #
     3 LOCAL_PATH := $(call my-dir)
     4 $(warning $(LOCAL_PATH))
     5 
     6 include $(CLEAR_VARS)
     7 
     8 ifeq ($(LIBETPAN_PATH),)
     9 $(error LIBETPAN_PATH must be set)
    10 endif
    11 
    12 ifeq ($(GPGME_INCLUDE_PATH),)
    13 $(error GPGME_INCLUDE_PATH must be set)
    14 endif
    15 
    16 LOCAL_MODULE    := pEpEngine
    17 LOCAL_CFLAGS    += -std=c99
    18 
    19 ifneq ($(NDEBUG),)
    20 LOCAL_CFLAGS    += -DNDEBUG=1
    21 endif
    22 
    23 # from http://www.sqlite.org/android/finfo?name=jni/sqlite/Android.mk 
    24 #      http://www.sqlite.org/android/artifact/e8ed354b3e58c835
    25 
    26 # This is important - it causes SQLite to use memory for temp files. Since 
    27 # Android has no globally writable temp directory, if this is not defined the
    28 # application throws an exception when it tries to create a temp file.
    29 #
    30 LOCAL_CFLAGS    += -DSQLITE_TEMP_STORE=3
    31 
    32 LOCAL_C_INCLUDES := ../../src \
    33                     ../../asn.1 \
    34                     $(GPGME_INCLUDE_PATH) \
    35                     $(LIBETPAN_PATH)/include
    36 ENGINE_SRC_FILES := $(shell find ../../src/ ! -name "*netpgp*" -name "*.c")
    37 #ENGINE_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.c)
    38 $(warning $(ENGINE_SRC_FILES))
    39 ASN1_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../asn.1/*.c)
    40 LOCAL_SRC_FILES := $(ENGINE_SRC_FILES:%=%)  $(ASN1_SRC_FILES:$(LOCAL_PATH)/%=%)
    41 
    42 
    43 include $(BUILD_STATIC_LIBRARY)