Adding support for the build of libcharon (and charon) on Android.
authorTobias Brunner <tobias@strongswan.org>
Tue, 16 Mar 2010 16:18:58 +0000 (17:18 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 19 Mar 2010 12:34:53 +0000 (13:34 +0100)
Android.mk.in
src/charon/Android.mk [new file with mode: 0644]
src/libcharon/Android.mk

index a94c744..d8e68a8 100644 (file)
@@ -52,5 +52,6 @@ strongswan_CFLAGS += \
 
 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
                charon \
+               libcharon \
                libstrongswan \
        ))
diff --git a/src/charon/Android.mk b/src/charon/Android.mk
new file mode 100644 (file)
index 0000000..e8bb89a
--- /dev/null
@@ -0,0 +1,26 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# copy-n-paste from Makefile.am
+LOCAL_SRC_FILES := \
+       charon.c
+
+# build charon -----------------------------------------------------------------
+
+LOCAL_C_INCLUDES += \
+       $(libvstr_PATH) \
+       $(strongswan_PATH)/src/libcharon \
+       $(strongswan_PATH)/src/libstrongswan
+
+LOCAL_CFLAGS := $(strongswan_CFLAGS)
+
+LOCAL_MODULE := charon
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_SHARED_LIBRARIES += libstrongswan libcharon
+
+include $(BUILD_EXECUTABLE)
+
index 68647db..8e0d4e6 100644 (file)
@@ -210,7 +210,7 @@ LOCAL_SRC_FILES += $(call add_plugin, socket-dynamic, \
        socket_dynamic_socket.h socket_dynamic_socket.c \
 )
 
-# build charon -----------------------------------------------------------------
+# build libcharon --------------------------------------------------------------
 
 LOCAL_C_INCLUDES += \
        $(libvstr_PATH) \
@@ -219,10 +219,7 @@ LOCAL_C_INCLUDES += \
 
 LOCAL_CFLAGS := $(strongswan_CFLAGS)
 
-# this is required to be able load the plugins
-LOCAL_LDFLAGS := -Wl,--export-dynamic
-
-LOCAL_MODULE := charon
+LOCAL_MODULE := libcharon
 
 LOCAL_ARM_MODE := arm
 
@@ -230,5 +227,5 @@ LOCAL_PRELINK_MODULE := false
 
 LOCAL_SHARED_LIBRARIES += libstrongswan
 
-include $(BUILD_EXECUTABLE)
+include $(BUILD_SHARED_LIBRARY)