#!/bin/bash

ROOT_PATH=$(dirname $(readlink -f $BASH_SOURCE))

###
### Android NDK path
###
NDK_BUILD=ndk-build
PLATFORM=Generic
# Needs to change due to limitations in NDK build
export HDCP2_ROOT=${ROOT_PATH}/libhdcp2
export TZ_HDCP2_ROOT=${ROOT_PATH}/../swd/tz_hdcp2/Locals/Code

echo "${ROOT_PATH}"
echo "${TZ_HDCP2_ROOT}"

# Remove temporary version header file again
# run NDK build
${NDK_BUILD} \
	-B \
	NDK_DEBUG=1 \
	NDK_PROJECT_PATH=$ROOT_PATH/libhdcp2 \
	NDK_APPLICATION_MK=$ROOT_PATH/libhdcp2/Application.mk \
	NDK_MODULE_PATH=. \
	NDK_APP_OUT=$ROOT_PATH/Out/ \
	APP_BUILD_SCRIPT=$ROOT_PATH/libhdcp2/Android.mk \
	APP_OPTIM=$MODE
# Remove temporary version header file again

