if [ $1 == "clean" ]
then
    echo "Cleaning crc external library"
    cd libcrc-2.0
    make clean
    cd ..

    echo "Cleaning crc hmac library"
    cd hmac
    make clean
    cd ..

    echo "Cleaning bmedtls library"
    cd mbedtls
    make clean
    cd ..

else
    # ************** Building crc external library ***************
    cd libcrc-2.0
    make clean
    make all
    cd ..

    # ************ Building hmac library *********************
    cd hmac
    make clean
    make all
    cd ..

    # ************ Building mbedtls *************************
    cd mbedtls
    make clean
    make all
    cd ..
fi
