build-android/jni/Android.mk
author Volker Birk <vb@pep-project.org>
Mon, 06 May 2019 15:44:16 +0200
branchsync
changeset 3635 137abddfa112
parent 3469 ff201109d96e
child 3741 6f92319aefbb
permissions -rw-r--r--
Removed tag 1.3.1-RC2-sync
vb@1513
     1
# Copyleft 2015 pEp foundation
Edouard@333
     2
#
vb@1513
     3
# This file is under GNU General Public License 3.0
vb@1513
     4
# see LICENSE.txt
huss@1528
     5
LOCAL_PATH := $(call my-dir)
vb@1513
     6
huss@1528
     7
LIBETPAN_PATH:=  $(LOCAL_PATH)/../../../pEpJNIAdapter/android/external/libetpan/build-android
huss@1528
     8
GPGME_INCLUDE_PATH:=  $(LOCAL_PATH)/../../../pEpJNIAdapter/android/external/data/data/pep.android.k9/app_opt/include
Edouard@333
     9
Edouard@333
    10
include $(CLEAR_VARS)
Edouard@333
    11
Edouard@333
    12
ifeq ($(LIBETPAN_PATH),)
Edouard@333
    13
$(error LIBETPAN_PATH must be set)
Edouard@333
    14
endif
Edouard@333
    15
Edouard@353
    16
ifeq ($(GPGME_INCLUDE_PATH),)
Edouard@353
    17
$(error GPGME_INCLUDE_PATH must be set)
Edouard@353
    18
endif
Edouard@353
    19
Edouard@333
    20
LOCAL_MODULE    := pEpEngine
Edouard@333
    21
LOCAL_CFLAGS    += -std=c99
Edouard@333
    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
huss@2331
    32
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../asn.1 \
Edouard@353
    33
                    $(GPGME_INCLUDE_PATH) \
Edouard@333
    34
                    $(LIBETPAN_PATH)/include
huss@1528
    35
LOCAL_C_INCLUDES += $(GPGBUILD)/include
huss@1528
    36
huss@2331
    37
$(shell sh $(LOCAL_PATH)/../takeOutHeaderFiles.sh $(LOCAL_PATH)../../)
huss@2331
    38
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)../include
Edouard@1529
    39
huss@3469
    40
ENGINE_SRC_FILES := $(shell find $(LOCAL_PATH)/../../src/ ! -name "*sequoia*" ! -name "*netpgp*" -name "*.c")
Hussein@660
    41
#ENGINE_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.c)
Hussein@660
    42
ASN1_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../asn.1/*.c)
Hussein@660
    43
LOCAL_SRC_FILES := $(ENGINE_SRC_FILES:%=%)  $(ASN1_SRC_FILES:$(LOCAL_PATH)/%=%)
Hussein@660
    44
Edouard@333
    45
Edouard@333
    46
include $(BUILD_STATIC_LIBRARY)