# includes
strongswan_PATH := $(LOCAL_PATH)
-libvstr_PATH := external/strongswan-support/vstr/include
libcurl_PATH := external/strongswan-support/libcurl/include
libgmp_PATH := external/strongswan-support/gmp
openssl_PATH := external/openssl/include
-DMONOLITHIC \
-DUSE_IKEV1 \
-DUSE_IKEV2 \
- -DUSE_VSTR \
+ -DUSE_BUILTIN_PRINTF \
-DDEBUG \
-DROUTING_TABLE=0 \
-DROUTING_TABLE_PRIO=220 \
if test x$vstr = xtrue; then
AC_CHECK_LIB([vstr],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])],[])
- AC_DEFINE([USE_VSTR], [], [use vstring library for printf hooks])
+ AC_DEFINE([USE_VSTR], [], [use Vstr string library for printf hooks])
builtin_printf=false
fi
# build charon -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libcharon \
$(strongswan_PATH)/src/libstrongswan
built on Android (and especially in the NDK), we provide a modified mirror
of the official Android OpenSSL version on git.strongswan.org.
- - vstr: The Vstr string library. Since cross-compiling this library is not
- that easy with the configure script and Makefiles included in the tarball,
- the easiest way to build it is using either droid-gcc (as described on
- wiki.strongswan.org) or a standalone toolchain built with the NDK.
- The build script provided on the wiki builds the library with droid-gcc
- and copies the required header files to the configured installation
- directory. Please note that the Android.mk provided on the wiki (vstr.mk)
- does not work in the NDK. A replacement is already in place in jni/vstr.
-
openssl
strongswan
-vstr/include
-vstr/*/libvstr.a
# includes
strongswan_PATH := $(LOCAL_PATH)/strongswan
-libvstr_PATH := $(LOCAL_PATH)/vstr/include
openssl_PATH := $(LOCAL_PATH)/openssl/include
# CFLAGS (partially from a configure run using droid-gcc)
-DMONOLITHIC \
-DUSE_IKEV1 \
-DUSE_IKEV2 \
- -DUSE_VSTR \
+ -DUSE_BUILTIN_PRINTF \
-DDEBUG \
-DCHARON_UDP_PORT=0 \
-DCHARON_NATT_PORT=0 \
endif
strongswan_BUILD := \
- vstr \
openssl \
libandroidbridge \
strongswan/src/libipsec \
# select the ABI(s) to build for (see CPU-ARCH-ABIS.html in the NDK docs).
-# Vstr has to be built accordingly first.
APP_ABI := armeabi x86
# build libandroidbridge -------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libipsec \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libcharon \
+++ /dev/null
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(TARGET_ARCH)/libvstr.a
-
-LOCAL_MODULE := libvstr
-
-LOCAL_PRELINK_MODULE := false
-
-include $(PREBUILT_STATIC_LIBRARY)
# build libcharon --------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libstrongswan
# build libhydra ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libstrongswan
# build libimcv ----------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libstrongswan
# build libipsec ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libstrongswan
# build libpts -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libimcv \
$(strongswan_PATH)/src/libstrongswan
threading/mutex.c threading/semaphore.c threading/rwlock.c threading/spinlock.c \
utils/utils.c utils/chunk.c utils/debug.c utils/enum.c utils/identification.c \
utils/lexparser.c utils/optionsfrom.c utils/capabilities.c utils/backtrace.c \
-utils/printf_hook/printf_hook_vstr.c utils/settings.c
+utils/printf_hook/printf_hook_builtin.c utils/settings.c
# adding the plugin source files
# build libstrongswan ----------------------------------------------------------
-LOCAL_C_INCLUDES += \
- $(libvstr_PATH)
-
LOCAL_CFLAGS := $(strongswan_CFLAGS) \
-include $(LOCAL_PATH)/AndroidConfigLocal.h
LOCAL_PRELINK_MODULE := false
-LOCAL_SHARED_LIBRARIES += libdl libvstr
+LOCAL_SHARED_LIBRARIES += libdl
include $(BUILD_SHARED_LIBRARY)
# build libtncif ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libtls \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libstrongswan
# build libtncif ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS)
# build scepclient -------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS) \
# build starter ----------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libstrongswan \
$(strongswan_PATH)/src/stroke
# build stroke -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
- $(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS)