Skip to content

Commit

Permalink
Android build support.
Browse files Browse the repository at this point in the history
[dwmw2: Clean up file lists, define IF_TUN_HDR]

Signed-off-by: Jason Cooper <cyanogen@lakedaemon.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Jason Cooper authored and David Woodhouse committed Jul 15, 2011
1 parent 8deed25 commit 95b9b40
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
71 changes: 71 additions & 0 deletions Android.mk
@@ -0,0 +1,71 @@
LOCAL_PATH := $(call my-dir)


# This list comes from the following variables in the normal Makefile.am:
# $(openconnect_SOURCES) $(libopenconnect_la_SOURCES) $(noinst_HEADERS)
common_SRC_FILES := \
xml.c main.c dtls.c cstp.c mainloop.c tun.c \
ssl.c http.c version.c auth.c library.c \
openconnect-internal.h openconnect.h

common_CFLAGS += -DANDROID -DIF_TUN_HDR="linux/if_tun.h"

common_C_INCLUDES += \
$(JNI_H_INCLUDE) \
$(LOCAL_PATH)/WebKit/android/icu \
external/ \
external/icu4c/common \
external/icu4c/i18n \
external/libxml2/include \
bionic/libc/include/ \
external/openssl \
external/openssl/include \
external/openssl/crypto \
external/zlib \
frameworks/base/cmds/keystore

common_SHARED_LIBRARIES := libcutils \
libz \
libicuuc \
libicui18n

ifneq ($(TARGET_SIMULATOR),true)
common_SHARED_LIBRARIES += libdl
endif

# static linked binary
# =====================================================

#include $(CLEAR_VARS)
#LOCAL_SRC_FILES := $(common_SRC_FILES)
#LOCAL_CFLAGS := $(common_CFLAGS)
#LOCAL_C_INCLUDES := $(common_C_INCLUDES)
#
#LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES)
#LOCAL_STATIC_LIBRARIES:= libopenssl-static liblzo-static
#
##LOCAL_LDLIBS += -ldl
##LOCAL_PRELINK_MODULE:= false
#
#LOCAL_MODULE:= openconnect-static
#LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
#include $(BUILD_EXECUTABLE)

# dynamic linked binary
# =====================================================

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(common_SRC_FILES)
LOCAL_CFLAGS := $(common_CFLAGS)
LOCAL_C_INCLUDES := $(common_C_INCLUDES)

LOCAL_SHARED_LIBRARIES := $(common_SHARED_LIBRARIES) libssl libcrypto libz
LOCAL_STATIC_LIBRARIES := libxml2 liblog

#LOCAL_LDLIBS += -ldl
#LOCAL_PRELINK_MODULE := false

LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := openconnect
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
include $(BUILD_EXECUTABLE)
3 changes: 2 additions & 1 deletion openconnect.html
Expand Up @@ -183,6 +183,7 @@ <H2>Release Notes / Changelog</H2>
<UL>
<LI><B>OpenConnect HEAD</B><BR>
<UL>
<LI>Add <TT>Android.mk</TT> file for Android build support</TT>
<LI>Add logging support for Android, in place of standard <TT>syslog()</TT>.</LI>
<LI>Switch back to using TLSv1, but without extensions.</LI>
<LI>Make TPM support optional, dependent on OpenSSL ENGINE support.</LI>
Expand Down Expand Up @@ -490,6 +491,6 @@ <H3>FreeBSD</H3>
<hr>
<address>David Woodhouse &lt;<A HREF="mailto:dwmw2@infradead.org">dwmw2@infradead.org</A>&gt;</address>
<!-- hhmts start -->
Last modified: Fri Jul 15 10:47:38 PDT 2011
Last modified: Fri Jul 15 11:07:59 PDT 2011
<!-- hhmts end -->
</body> </html>

0 comments on commit 95b9b40

Please sign in to comment.