#!/bin/sh
# 1) install mingw64
# 2) install gsl in ../w64 (with -O3)
# 3) install libirt in ../w64 (with -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -O3)
# 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/Public/libirt-bin/win64/lib -I/Public/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/Public/libirt-bin/win64/lib
