LOCAL_PATH := $(call my-dir)

###########################
#
# tcltls shared library
#
###########################

include $(CLEAR_VARS)

tcl_path := $(LOCAL_PATH)/../tcl

include $(tcl_path)/tcl-config.mk

LOCAL_ADDITIONAL_DEPENDENCIES += $(tcl_path)/tcl-config.mk

LOCAL_MODULE := tcltls

LOCAL_C_INCLUDES := $(tcl_includes) $(LOCAL_PATH)/../libressl/include

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_SRC_FILES := tls.c tlsIO.c tlsBIO.c tlsX509.c

LOCAL_CFLAGS := $(tcl_cflags) \
	-DPACKAGE_NAME="\"tls\"" \
	-DPACKAGE_VERSION="\"1.6.7\"" \
	-DNO_SSL2=1 \
	-O2

LOCAL_SHARED_LIBRARIES := libtcl libcrypto_tls libssl_tls

include $(BUILD_SHARED_LIBRARY)
