#!/bin/sh
# 1) install mingw32
# 2) install gsl (with -O3 -mrtd)
# 3) install libirt (with -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3 -mrtd)
# 4) get the file irt_wrapper.c from the R package rirt
i586-mingw32msvc-gcc -c -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3 -mrtd \
    -L/Public/libirt-bin/win32-mrtd/lib -I/Public/libirt-bin/win32-mrtd/include \
    irt_wrapper.c \
&& i586-mingw32msvc-dllwrap -mrtd --def export.def -o eirt.dll irt_wrapper.o \
    -lirt -lgsl -lgslcblas -L/Public/libirt-bin/win32-mrtd/lib
