gfortran -ffree-form -cpp -shared -fPIC -DCINTER xmat.f -o xmatc.so
rm *.mod
for Linux with GCC or from Windows with Intel compiler something similar toifort /free /fpp /dll /recursive /MT /DCINTER xmat.f /exe:xmatc.dll
del *.mod
Please note, that for compilation the macro CINTER
has to be defined next to the flags for free format, preprocessing and dynamic linking (as shown).