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