For instructions of installing GMT binary packages on different operating systems, please refer to https://docs.generic-mapping-tools.org/latest/install.html.
For instructions of compiling GMT source package, please refer to https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md.