android: Remove dependency on libvstr

This commit is contained in:
Tobias Brunner 2013-11-13 11:29:59 +01:00
parent 27467a6881
commit 20c99edab9
20 changed files with 5 additions and 46 deletions

View File

@ -36,7 +36,6 @@ include $(LOCAL_PATH)/Android.common.mk
# 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
@ -77,7 +76,7 @@ strongswan_CFLAGS := \
-DMONOLITHIC \
-DUSE_IKEV1 \
-DUSE_IKEV2 \
-DUSE_VSTR \
-DUSE_BUILTIN_PRINTF \
-DDEBUG \
-DROUTING_TABLE=0 \
-DROUTING_TABLE_PRIO=220 \

View File

@ -643,7 +643,7 @@ AC_CHECK_FUNC(
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

View File

@ -8,7 +8,6 @@ charon.c
# build charon -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libcharon \
$(strongswan_PATH)/src/libstrongswan

View File

@ -11,12 +11,3 @@ folder:
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.

View File

@ -1,4 +1,2 @@
openssl
strongswan
vstr/include
vstr/*/libvstr.a

View File

@ -20,7 +20,6 @@ include $(LOCAL_PATH)/strongswan/Android.common.mk
# 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)
@ -53,7 +52,7 @@ strongswan_CFLAGS := \
-DMONOLITHIC \
-DUSE_IKEV1 \
-DUSE_IKEV2 \
-DUSE_VSTR \
-DUSE_BUILTIN_PRINTF \
-DDEBUG \
-DCHARON_UDP_PORT=0 \
-DCHARON_NATT_PORT=0 \
@ -66,7 +65,6 @@ strongswan_CFLAGS += -DUSE_BYOD
endif
strongswan_BUILD := \
vstr \
openssl \
libandroidbridge \
strongswan/src/libipsec \

View File

@ -1,3 +1,2 @@
# 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

View File

@ -23,7 +23,6 @@ endif
# build libandroidbridge -------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libipsec \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libcharon \

View File

@ -1,11 +0,0 @@
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)

View File

@ -217,7 +217,6 @@ endif
# build libcharon --------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libstrongswan

View File

@ -26,7 +26,6 @@ LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink)
# build libhydra ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libstrongswan

View File

@ -46,7 +46,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(libimcv_la_SOURCES))
# build libimcv ----------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libstrongswan

View File

@ -20,7 +20,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(libipsec_la_SOURCES))
# build libipsec ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/include \
$(strongswan_PATH)/src/libstrongswan

View File

@ -57,7 +57,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(libpts_la_SOURCES))
# build libpts -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libimcv \
$(strongswan_PATH)/src/libstrongswan

View File

@ -36,7 +36,7 @@ selectors/traffic_selector.c threading/thread.c threading/thread_value.c \
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
@ -96,9 +96,6 @@ LOCAL_SRC_FILES += $(call add_plugin, xcbc)
# build libstrongswan ----------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH)
LOCAL_CFLAGS := $(strongswan_CFLAGS) \
-include $(LOCAL_PATH)/AndroidConfigLocal.h
@ -110,6 +107,6 @@ LOCAL_ARM_MODE := arm
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES += libdl libvstr
LOCAL_SHARED_LIBRARIES += libdl
include $(BUILD_SHARED_LIBRARY)

View File

@ -35,7 +35,6 @@ endif
# build libtncif ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libtls \
$(strongswan_PATH)/src/libtncif \
$(strongswan_PATH)/src/libstrongswan

View File

@ -13,7 +13,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(libtncif_la_SOURCES))
# build libtncif ---------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS)

View File

@ -10,7 +10,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(scepclient_SOURCES))
# build scepclient -------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS) \

View File

@ -14,7 +14,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(starter_SOURCES))
# build starter ----------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libhydra \
$(strongswan_PATH)/src/libstrongswan \
$(strongswan_PATH)/src/stroke

View File

@ -10,7 +10,6 @@ LOCAL_SRC_FILES := $(filter %.c,$(stroke_SOURCES))
# build stroke -----------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS)