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