How to use external C/C++ codes which depends on gromacs library?

GROMACS version:2018.6
GROMACS modification: No
Hello all,
I want to use g_thickness from Downloads » Luca monticelli and other tools there
to analyze membrane properties. As directed in Readme, I am sourcing GMXRC (/usr/local/gromacs/bin/GMXRC) and hit sudo make. The error is showing
Makefile:24: *** “GMXLDLIB not found, please source GMXRC”. Stop.
How to resolve the issue?
Also, as a layman in C/softwares, my general question is how to compile such external C/C++ codes and use them with GROMACS?
My wild guess is that, the answers may lie in the makefile, location of gromacs libraries, its version and /usr/local/gromacs/share/gromacs/template folder.
I need help from the community. The readme and makefile (in .dat format) is attached.
Thanks for your time and cooperation.
Regards, Anirban
Makefile.dat (1.4 KB)
README.dat (4.1 KB)

You’ll need to use a version of GROMACS that they intended to work, so best start by checking what version they used in their paper.

Thank you so much for your advice @mabraham.
README says ‘Only versions 4.5.x have been tested, but g_thickness might be compatible with other versions of GROMACS’ So I tried to built it with 2018.6, which is installed in my system. I will surely use 4.5.x versions to compile it.
But I like to know if the makefile can be modified accordingly and one can built the program with 2018.6 or other versions. Or we also have to be careful then about the other functions and libraries?
Thanks and Regards.
Anirban