| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
OS="$1" |
| 6 |
ARCH="$2" |
| 7 |
EXPORT="$3" |
| 8 |
JSONL="blis/_src/make/$OS-$ARCH.jsonl" |
| 9 |
|
| 10 |
cd flame-blis |
| 11 |
if [ ! -f $JSONL ]; then |
| 12 |
echo "Compile" |
| 13 |
if [[ "$OS" == "windows" ]]; then |
| 14 |
mingw32-make clean |
| 15 |
./configure --disable-blas --disable-cblas --disable-shared --disable-threading --int-size=64 --enable-verbose-make --enable-arg-max-hack $ARCH |
| 16 |
mingw32-make -j 4 > make.log |
| 17 |
else |
| 18 |
make clean |
| 19 |
./configure --disable-blas --disable-cblas --disable-shared --disable-threading --int-size=64 --enable-verbose-make --export-shared=all $ARCH |
| 20 |
make > make.log |
| 21 |
fi |
| 22 |
echo "Preprocess make log" |
| 23 |
cat make.log | python ../bin/munge_make_log.py $OS $ARCH > ../$JSONL |
| 24 |
mkdir -p ../blis/_src/include/$OS-$ARCH/ |
| 25 |
cp include/$ARCH/blis.h ../blis/_src/include/$OS-$ARCH/blis.h |
| 26 |
fi |
| 27 |
|
| 28 |
if [[ "$EXPORT" == "--export" ]]; then |
| 29 |
mkdir -p ../artifacts/ |
| 30 |
cp ../blis/_src/include/$OS-$ARCH/blis.h ../artifacts/blis-$OS-$ARCH.h |
| 31 |
cp ../blis/_src/make/$OS-$ARCH.jsonl ../artifacts/$OS-$ARCH.jsonl; |
| 32 |
fi |