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
Edouard@333
     1
# Copyright (C) 2015 pEp
Edouard@333
     2
#
Edouard@333
     3
LOCAL_PATH := $(call my-dir)
Hussein@660
     4
$(warning $(LOCAL_PATH))
Edouard@333
     5
Edouard@333
     6
include $(CLEAR_VARS)
Edouard@333
     7
Edouard@333
     8
ifeq ($(LIBETPAN_PATH),)
Edouard@333
     9
$(error LIBETPAN_PATH must be set)
Edouard@333
    10
endif
Edouard@333
    11
Edouard@353
    12
ifeq ($(GPGME_INCLUDE_PATH),)
Edouard@353
    13
$(error GPGME_INCLUDE_PATH must be set)
Edouard@353
    14
endif
Edouard@353
    15
Edouard@333
    16
LOCAL_MODULE    := pEpEngine
Edouard@333
    17
LOCAL_CFLAGS    += -std=c99
Edouard@333
    18
Edouard@1495
    19
ifneq ($(NDEBUG),)
Edouard@1495
    20
LOCAL_CFLAGS    += -DNDEBUG=1
Edouard@1495
    21
endif
Edouard@1495
    22
Edouard@685
    23
# from http://www.sqlite.org/android/finfo?name=jni/sqlite/Android.mk 
Edouard@685
    24
#      http://www.sqlite.org/android/artifact/e8ed354b3e58c835
Edouard@685
    25
Edouard@685
    26
# This is important - it causes SQLite to use memory for temp files. Since 
Edouard@685
    27
# Android has no globally writable temp directory, if this is not defined the
Edouard@685
    28
# application throws an exception when it tries to create a temp file.
Edouard@685
    29
#
Edouard@685
    30
LOCAL_CFLAGS    += -DSQLITE_TEMP_STORE=3
Edouard@685
    31
Edouard@333
    32
LOCAL_C_INCLUDES := ../../src \
Hussein@660
    33
                    ../../asn.1 \
Edouard@353
    34
                    $(GPGME_INCLUDE_PATH) \
Edouard@333
    35
                    $(LIBETPAN_PATH)/include
Hussein@660
    36
ENGINE_SRC_FILES := $(shell find ../../src/ ! -name "*netpgp*" -name "*.c")
Hussein@660
    37
#ENGINE_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.c)
Hussein@660
    38
$(warning $(ENGINE_SRC_FILES))
Hussein@660
    39
ASN1_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../asn.1/*.c)
Hussein@660
    40
LOCAL_SRC_FILES := $(ENGINE_SRC_FILES:%=%)  $(ASN1_SRC_FILES:$(LOCAL_PATH)/%=%)
Hussein@660
    41
Edouard@333
    42
Edouard@333
    43
include $(BUILD_STATIC_LIBRARY)