#!/bin/sh
set -eu

. $(pwd)/windows_build_vars

mkdir -p build-mbedtls
(cd build-mbedtls

rm -rf CMake*

PKCS11H_BUILD_DIR="$(pwd)/../build-pkcs11-helper"

CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
cmake -G "Unix Makefiles" \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \
	../mbedtls
)
