$ cd ~/MINGW-packages-master\mingw-w64-glfw
$ makepkg-mingw
You will be told that a lot of stuff is missing, install it using pacman or whatever it tells you to do.
$ pacman -U mingw-w64-x86_64-glfw-*.pkg.tar.xz
Rename the libglfw.dll.a library file in C:\msys64\mingw64\lib to libglfwdll.a