Added generate asn.1 step to android build script, using wildcard instead of list of file in Android.mk
authorHussein Kasem
Wed, 18 May 2016 15:53:12 +0200
changeset 660e1905543313b
parent 659 37bdde68b914
child 661 ec4acbe24505
Added generate asn.1 step to android build script, using wildcard instead of list of file in Android.mk
build-android/build.sh
build-android/jni/Android.mk
     1.1 --- a/build-android/build.sh	Wed May 18 15:12:19 2016 +0200
     1.2 +++ b/build-android/build.sh	Wed May 18 15:53:12 2016 +0200
     1.3 @@ -48,6 +48,10 @@
     1.4  cd "$current_dir/../src"
     1.5  cp *.h "$current_dir/$package_name-$build_version/include/pEp"
     1.6  
     1.7 +# Generate asn.1
     1.8 +cd "$current_dir/../asn.1"
     1.9 +make generate
    1.10 +
    1.11  # Start building.
    1.12  for arch in $archs ; do
    1.13    TARGET_ARCH_ABI=$arch
     2.1 --- a/build-android/jni/Android.mk	Wed May 18 15:12:19 2016 +0200
     2.2 +++ b/build-android/jni/Android.mk	Wed May 18 15:53:12 2016 +0200
     2.3 @@ -1,6 +1,7 @@
     2.4  # Copyright (C) 2015 pEp
     2.5  #
     2.6  LOCAL_PATH := $(call my-dir)
     2.7 +$(warning $(LOCAL_PATH))
     2.8  
     2.9  include $(CLEAR_VARS)
    2.10  
    2.11 @@ -14,84 +15,16 @@
    2.12  
    2.13  LOCAL_MODULE    := pEpEngine
    2.14  LOCAL_CFLAGS    += -std=c99
    2.15 -LOCAL_SRC_FILES := ../../src/bloblist.c \
    2.16 -                   ../../src/cryptotech.c \
    2.17 -                   ../../src/email.c \
    2.18 -                   ../../src/etpan_mime.c \
    2.19 -                   ../../src/identity_list.c \
    2.20 -                   ../../src/keymanagement.c \
    2.21 -                   ../../src/message_api.c \
    2.22 -                   ../../src/message.c \
    2.23 -                   ../../src/mime.c \
    2.24 -                   ../../src/pEpEngine.c \
    2.25 -                   ../../src/pgp_gpg.c \
    2.26 -                   ../../src/platform_unix.c \
    2.27 -                   ../../src/sqlite3.c \
    2.28 -                   ../../src/stringlist.c \
    2.29 -                   ../../src/stringpair.c \
    2.30 -                   ../../src/timestamp.c \
    2.31 -                   ../../src/trans_auto.c \
    2.32 -                   ../../src/transport.c \
    2.33 -                   ../../src/blacklist.c \
    2.34 -                   ../../asn.1/UTF8String.h \
    2.35 -                   ../../asn.1/INTEGER.h \
    2.36 -                   ../../asn.1/NativeEnumerated.h \
    2.37 -                   ../../asn.1/INTEGER.c \
    2.38 -                   ../../asn.1/NativeEnumerated.c \
    2.39 -                   ../../asn.1/NativeInteger.h \
    2.40 -                   ../../asn.1/NativeInteger.c \
    2.41 -                   ../../asn.1/PrintableString.h \
    2.42 -                   ../../asn.1/PrintableString.c \
    2.43 -                   ../../asn.1/UTF8String.c \
    2.44 -                   ../../asn.1/asn_SEQUENCE_OF.h \
    2.45 -                   ../../asn.1/asn_SEQUENCE_OF.c \
    2.46 -                   ../../asn.1/asn_SET_OF.h \
    2.47 -                   ../../asn.1/asn_SET_OF.c \
    2.48 -                   ../../asn.1/constr_SEQUENCE.h \
    2.49 -                   ../../asn.1/constr_SEQUENCE.c \
    2.50 -                   ../../asn.1/constr_SEQUENCE_OF.h \
    2.51 -                   ../../asn.1/constr_SEQUENCE_OF.c \
    2.52 -                   ../../asn.1/constr_SET_OF.h \
    2.53 -                   ../../asn.1/constr_SET_OF.c \
    2.54 -                   ../../asn.1/asn_application.h \
    2.55 -                   ../../asn.1/asn_system.h \ \
    2.56 -                   ../../asn.1/asn_codecs.h \
    2.57 -                   ../../asn.1/asn_internal.h \
    2.58 -                   ../../asn.1/OCTET_STRING.h \
    2.59 -                   ../../asn.1/OCTET_STRING.c \
    2.60 -                   ../../asn.1/BIT_STRING.h \
    2.61 -                   ../../asn.1/BIT_STRING.c \
    2.62 -                   ../../asn.1/asn_codecs_prim.c \
    2.63 -                   ../../asn.1/asn_codecs_prim.h \
    2.64 -                   ../../asn.1/ber_tlv_length.h \
    2.65 -                   ../../asn.1/ber_tlv_length.c \
    2.66 -                   ../../asn.1/ber_tlv_tag.h \
    2.67 -                   ../../asn.1/ber_tlv_tag.c \
    2.68 -                   ../../asn.1/ber_decoder.h \
    2.69 -                   ../../asn.1/ber_decoder.c \
    2.70 -                   ../../asn.1/der_encoder.h \
    2.71 -                   ../../asn.1/der_encoder.c \
    2.72 -                   ../../asn.1/constr_TYPE.h \
    2.73 -                   ../../asn.1/constr_TYPE.c \
    2.74 -                   ../../asn.1/constraints.h \
    2.75 -                   ../../asn.1/constraints.c \
    2.76 -                   ../../asn.1/xer_support.h \
    2.77 -                   ../../asn.1/xer_support.c \ \
    2.78 -                   ../../asn.1/xer_decoder.h \
    2.79 -                   ../../asn.1/xer_decoder.c \
    2.80 -                   ../../asn.1/xer_encoder.h \
    2.81 -                   ../../asn.1/xer_encoder.c \
    2.82 -                   ../../asn.1/per_support.h \
    2.83 -                   ../../asn.1/per_support.c \
    2.84 -                   ../../asn.1/per_decoder.h \
    2.85 -                   ../../asn.1/per_decoder.c \
    2.86 -                   ../../asn.1/per_encoder.h \
    2.87 -                   ../../asn.1/per_encoder.c \
    2.88 -                   ../../asn.1/per_opentype.h \
    2.89 -                   ../../asn.1/per_opentype.c
    2.90  
    2.91  LOCAL_C_INCLUDES := ../../src \
    2.92 +                    ../../asn.1 \
    2.93                      $(GPGME_INCLUDE_PATH) \
    2.94                      $(LIBETPAN_PATH)/include
    2.95 +ENGINE_SRC_FILES := $(shell find ../../src/ ! -name "*netpgp*" -name "*.c")
    2.96 +#ENGINE_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.c)
    2.97 +$(warning $(ENGINE_SRC_FILES))
    2.98 +ASN1_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../asn.1/*.c)
    2.99 +LOCAL_SRC_FILES := $(ENGINE_SRC_FILES:%=%)  $(ASN1_SRC_FILES:$(LOCAL_PATH)/%=%)
   2.100 +
   2.101  
   2.102  include $(BUILD_STATIC_LIBRARY)