Diff

Differences From Artifact [f6db47fdb8]:

To Artifact [9d644e9ea9]:


   102    102   _EOF_
   103    103   			cat 'tkConfig.sh.new'
   104    104   		) > 'tkConfig.sh'
   105    105   		rm -f 'tkConfig.sh.new'
   106    106   	fi
   107    107   )
   108    108   
          109  +# Create android makefile snippet, used by "ndk-build"
          110  +(
          111  +	is_android='0'
          112  +	if echo "${CC}" | grep -i 'android' >/dev/null; then
          113  +		is_android='1'
          114  +	fi
          115  +
          116  +	if [ "${KITCREATOR_ANDROID}" = '1' ]; then
          117  +		is_android='1'
          118  +	fi
          119  +
          120  +	if [ "${is_android}" != '1' ]; then
          121  +		exit 0
          122  +	fi
          123  +
          124  +	cd __tmp__ || exit 1
          125  +
          126  +	tclkitlibfile="$(cd lib/ && ls -1 libtclkit* | head -n 1 | sed 's@^.*/@@')"
          127  +	tclkitlibname="$(echo "${tclkitlibfile}" | sed 's@^lib@@;s@\..*$@@')"
          128  +
          129  +	cat << _EOF_ > Android.mk
          130  +LOCAL_PATH := \$(call my-dir)
          131  +include \$(CLEAR_VARS)
          132  +LOCAL_MODULE := ${tclkitlibname}
          133  +LOCAL_SRC_FILES := \$(LOCAL_PATH)/lib/${tclkitlibfile}
          134  +include \$(PREBUILT_SHARED_LIBRARY)
          135  +_EOF_
          136  +)
          137  +
   109    138   (
   110    139   	cd '__tmp__' || exit 1
   111    140   
   112    141   	mkdir "libtclkit-sdk-${TCLVERS}"
   113    142   
   114    143   	mv 'lib' 'include' 'doc' "libtclkit-sdk-${TCLVERS}/"
          144  +
          145  +	if [ -e 'Android.mk' ]; then
          146  +		mv 'Android.mk' "libtclkit-sdk-${TCLVERS}/"
          147  +	fi
   115    148   
   116    149   	tar -cf - "libtclkit-sdk-${TCLVERS}" | gzip -9c > "../libtclkit-sdk-${TCLVERS}.tar.gz"
   117    150   )
   118    151   
   119    152   rm -rf '__tmp__'
   120    153   
   121    154   exit 0