#!/bin/bash

# copy regex library dll where tests binaries lie
mkdir -p tests/bin
cp src/mingw-libgnurx-2.5.1/*.dll tests/bin

# build tests in parallel
make -C tests/ -j3 build \
    'TESTS_CFLAGS=-I ../src/PDCurses-3.8/ -I ../src/mingw-libgnurx-2.5.1' \
    'TESTS_LDFLAGS=-L ../src/PDCurses-3.8/wincon -L ../src/mingw-libgnurx-2.5.1'

# but run sequentially for serial output
make -C tests/ \
    'TESTS_CFLAGS=-I ../src/PDCurses-3.8/ -I ../src/mingw-libgnurx-2.5.1' \
    'TESTS_LDFLAGS=-L ../src/PDCurses-3.8/wincon -L ../src/mingw-libgnurx-2.5.1'
