reorder arrays so that random samples are contiguous in memory
mac homebrew compatible makefile with install target for fortran library