#!/bin/sh
# 1) install mingw64
# 2) install gsl (with -O3) in z:\libirt64
# 3) install libirt (with -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3) in z:\libirt64
# 4) get the file irt_wrapper.c from the R package rirt
x86_64-w64-mingw32-gcc -c -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3 \
    -L/z/libirt-bin/win64/lib -I/z/libirt-bin/win64/include \
    irt_wrapper.c \
&& x86_64-w64-mingw32-dllwrap --def export.def -o eirt64.dll irt_wrapper.o \
    -lirt -lgsl -lgslcblas -L/z/libirt-bin/win64/lib
