@ -14,55 +14,6 @@ APP_ABI ?= armeabi-v7a
APP_PLATFORM ?= android-14
PEP_PACKAGE_NAME ?= com.pep.pepjniaaractivity
#------------------------------------------------------------------------------#
# Clone update and archive external projects GIT repos
# Local clone is in external/$project.git while
# slected commit is archived in external/$project
EXTERNAL_GIT_REPOS = \
libetpan|https : //github .com /fdik /libetpan .git ?HEAD \
gnupg|git : //git .gnupg .org /gnupg .git ?08c 00cd \
libassuan|git : //git .gnupg .org /libassuan .git ?261498d \
libgcrypt|git : //git .gnupg .org /libgcrypt .git ?b 3936b 6\
libgpg-error|git : //git .gnupg .org /libgpg -error .git ?bcd 9295\
libksba|git : //git .gnupg .org /libksba .git ?02079b 5\
curl|https : //github .com /bagder /curl ?f 77e 89c \
npth|git : //git .gnupg .org /npth .git ?79fbdce \
gpgme|git : //git .gnupg .org /gpgme .git ?37d 927a
d e f i n e p e r _ r e p o _ t a r g e t s
$(1).git :
git clone $( 2) $( 1) .git
$(1).git_update : $( 1) .git
cd $( 1) .git; git pull
$(1) : | $( 1) .git
mkdir $( 1)
( cd $( 1) .git; git archive --format= tar $( 3) ) | tar -C $( 1) -x
$(1)_clean :
rm -rf $( 1)
EXTERNAL_LOCAL_GITS += $( 1) .git
EXTERNAL_LOCAL_GITS_UPDATE += $( 1) .git_update
EXTERNAL_SRCS += $( 1)
EXTERNAL_SRCS_CLEAN += $( 1) _clean
e n d e f
d e f i n e p e r _ r e p o
$( call per_repo_targets ,\
$( 1) ,\
$( word 1,$( subst ?, ,$( 2) ) ) ,\
$( word 2,$( subst ?, ,$( 2) ) ) )
e n d e f
$( foreach repo , $ ( EXTERNAL_GIT_REPOS ) , $ ( eval $ ( call per_repo ,\
$( word 1,$( subst | , ,$( repo) ) ) ,\
$( word 2,$( subst | , ,$( repo) ) ) ) ) )
git_update : $( EXTERNAL_LOCAL_GITS_UPDATE )
#------------------------------------------------------------------------------#
# Manage paths for PREFIX, DESTDIR, LOCAL and PATH
@ -105,13 +56,9 @@ TARGET_ARCH_ABI = $(APP_ABI)
i n c l u d e $( ANDROID_NDK_HOME ) / t o o l c h a i n s / $( NDK_TOOLCHAIN ) / s e t u p . m k
CC := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -gcc --sysroot= $( NDK_SYSROOT)
CXX := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -g++
CPP := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -cpp
LD := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -ld
AR := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -ar
RANLIB := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -ranlib
STRIP := $( NDK_TOOLCHAIN_BASE) /bin/$( HOST) -strip \
--strip-unneeded -R .note -R .comment
CFLAGS = -DANDROID -I$( LOCAL) /include $( TARGET_CFLAGS)
LDFLAGS = -llog -L$( LOCAL) /lib $( TARGET_LDFLAGS)
@ -132,13 +79,6 @@ export PKG_CONFIG_PATH=$(LOCAL)/lib/pkgconfig
# workaround for cross-compiling bug in autoconf
export ac_cv_func_malloc_0_nonnull = yes
# GnuPG does not work with automake 1.14, it has proven reliable on 1.11, and
# that's widely available, so we'll add it to the env here, and the
# ./autogen.sh scripts will pick it up.
# http://lists.gnupg.org/pipermail/gnupg-devel/2013-August/027857.html
export AUTOMAKE = automake-1.11
.PHONY = clean distclean install-clean \
libgpg-error-build libgpg-error-clean libgpg-error-install \
libgcrypt-build libgcrypt-clean libgcrypt-install \
@ -173,6 +113,8 @@ showsetup:
#------------------------------------------------------------------------------#
# libgpg-error
EXTERNAL_GIT_REPOS += libgpg-error| git://git.gnupg.org/libgpg-error.git?libgpg-error-1.20
libgpg-error/configure : libgpg -error libgpg -error /configure .ac
cd libgpg-error && ./autogen.sh
@ -217,6 +159,8 @@ libgpg-error-clean:
#------------------------------------------------------------------------------#
# libgcrypt
EXTERNAL_GIT_REPOS += libgcrypt| git://git.gnupg.org/libgcrypt.git?libgcrypt-1.6.4
libgcrypt/configure : libgcrypt libgcrypt /configure .ac
cd libgcrypt && ./autogen.sh
@ -249,6 +193,8 @@ libgcrypt-clean:
#------------------------------------------------------------------------------#
# libassuan
EXTERNAL_GIT_REPOS += libassuan| git://git.gnupg.org/libassuan.git?libassuan-2.3.0
libassuan/configure : libassuan libassuan /configure .ac
cd libassuan && ./autogen.sh && autoreconf --install --force --verbose
@ -281,6 +227,8 @@ libassuan-clean:
#------------------------------------------------------------------------------#
# npth
EXTERNAL_GIT_REPOS += npth| git://git.gnupg.org/npth.git?npth-1.2
npth/configure : npth npth /configure .ac
cd npth && ./autogen.sh && autoreconf --install --force --verbose
@ -313,6 +261,8 @@ npth-clean:
#------------------------------------------------------------------------------#
# libksba
EXTERNAL_GIT_REPOS += libksba| git://git.gnupg.org/libksba.git?libksba-1.3.3
libksba/configure : libksba libksba /configure .ac
cd libksba && ./autogen.sh
@ -345,6 +295,8 @@ libksba-clean:
#------------------------------------------------------------------------------#
# curl
EXTERNAL_GIT_REPOS += curl| https://github.com/bagder/curl?curl-7_45_0
curl/configure : curl curl /configure .ac
cd curl && ./buildconf
@ -388,6 +340,8 @@ curl-clean:
#------------------------------------------------------------------------------#
# gnupg
EXTERNAL_GIT_REPOS += gnupg| git://git.gnupg.org/gnupg.git?gnupg-2.1.8
gnupg/configure : gnupg
cd gnupg && ./autogen.sh
@ -440,8 +394,10 @@ gnupg-clean:
#------------------------------------------------------------------------------#
# gpgme
EXTERNAL_GIT_REPOS += gpgme| git://git.gnupg.org/gpgme.git?gpgme-1.6.0
gpgme/configure : gpgme gpgme /configure .ac
cd gpgme && ./autogen.sh
cd gpgme && ./autogen.sh
gpgme/Makefile : gpgme /configure
-patch -N -p1 --reject-file= - gpgme/m4/libtool.m4 libtool-Add-Android-Linux-support.patch
@ -458,6 +414,7 @@ gpgme/Makefile: gpgme/configure
--disable-gpg-test \
--disable-gpgsm-test \
--disable-gpgconf-test \
--disable-parallel-test \
--disable-g13-test \
--prefix= $( prefix)
@ -479,6 +436,8 @@ gpgme-clean:
#------------------------------------------------------------------------------#
# libetpan
EXTERNAL_GIT_REPOS += libetpan| https://github.com/fdik/libetpan.git?HEAD
libetpan/libetpan-android-1.zip : libetpan
cd libetpan/build-android; ./build.sh
@ -490,7 +449,7 @@ libetpan-build: libetpan/libetpan-android-1.zip
clean-assets :
rm -rf $( ASSETS)
ASSETS := $( EXTERNAL_ROOT) /../ assets
ASSETS := $( EXTERNAL_ROOT) /assets
assets : clean -assets
# add the new stuff
install -d $( ASSETS)
@ -534,3 +493,41 @@ gitclean: $(EXTERNAL_SRCS_CLEAN)
rm -rf $( ASSETS)
rm -rf $( EXTERNAL_ROOT) /data
#------------------------------------------------------------------------------#
# Clone update and archive external projects GIT repos
# Local clone is in external/$project.git while
# slected commit is archived in external/$project
d e f i n e p e r _ r e p o _ t a r g e t s
$(1).git :
git clone $( 2) $( 1) .git
$(1).git_update : $( 1) .git
cd $( 1) .git; git pull
$(1) : | $( 1) .git
mkdir $( 1)
( cd $( 1) .git; git archive --format= tar $( 3) ) | tar -C $( 1) -x
$(1)_clean :
rm -rf $( 1)
EXTERNAL_LOCAL_GITS += $( 1) .git
EXTERNAL_LOCAL_GITS_UPDATE += $( 1) .git_update
EXTERNAL_SRCS += $( 1)
EXTERNAL_SRCS_CLEAN += $( 1) _clean
e n d e f
d e f i n e p e r _ r e p o
$( call per_repo_targets ,\
$( 1) ,\
$( word 1,$( subst ?, ,$( 2) ) ) ,\
$( word 2,$( subst ?, ,$( 2) ) ) )
e n d e f
$( foreach repo , $ ( EXTERNAL_GIT_REPOS ) , $ ( eval $ ( call per_repo ,\
$( word 1,$( subst | , ,$( repo) ) ) ,\
$( word 2,$( subst | , ,$( repo) ) ) ) ) )
git_update : $( EXTERNAL_LOCAL_GITS_UPDATE )