...
gcc -o wind wind.c $(pkg-config --libs --cflags magics)
gfortran -o wind wind.f -lMagPlusSingle $(pkg-config --libs magics)
gfortran -o wind wind.f
-fdefault-real-8
-lMagPlusDouble $(pkg-config --libs magics)
To find the information about Magics compilation the environment variable PKG_CONFIG_PATH needs to contain the directory $MAGPLUS_HOME/lib/pkgconfig. For more information visit pkg-config on Wikipedia.