#!/usr/bin/env bash

PWD=$(pwd)
ROOT=$(dirname ${PWD})
BuildType=debug
BuildDir=${ROOT}/build/cmake-build-${BuildType}-default_toolchain/clang-aos_gea-aarch64
CMAKE_TOOLCHAIN_FILE=/usr/local/mdc_sdk_llvm/dp_gea/toolchain.cmake
mkdir -p ${BuildDir}

cd ${BuildDir}

echo "CMAKE_TOOLCHAIN_FILE" ${CMAKE_TOOLCHAIN_FILE}

/usr/bin/cmake -G "Unix Makefiles" \
    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \
    -DCMAKE_MAKE_PROGRAM=/usr/bin/make \
    -DCMAKE_BUILD_TYPE=Debug ${ROOT} && make


