Looking over the templates, there are too many system-specific templates. In most cases, a single linux-<compiler>.mk template should be required. This can be accomplished if the templates do not have hard-coded paths, as is done in hpcme-intel24.mk. For the cases where the compiler needs to search different locations, we can expect the developer to:
- use environment variables (e.g.,
LIBRARY_PATH, CPATH, etc.) to indicate where the compiler should look;
- make a copy of the closest template, and then make their own modifications;
We should also use tools to like pkgconfig to dynamically find the paths and what flags to add for particular libraries (e.g., hdf5, netcdf, etc.).