On Thu, 2021-01-14 at 12:56 +0100, Sébastien Hinderer wrote: > My question is: between LIBS and LDLIBS, which one is a build system > supposed to honour? "Supposed to" according to whom? The GNU make manual, and the built-in GNU make rules, all use LDLIBS. There is no mention of LIBS there. So, if you're following basic GNU make guidelines and you want to use, or emulate, the built-in rules for GNU make you should use LDLIBS. If you're using other build environments they may have other rules or traditions. Insofar as you're using those environments, you may want to follow their traditional names. With respect to autoconf, libraries that are detected by configure scripts as being required and present on the system are added to LIBS so if you're writing a makefile to be used with autoconf (say you're writing a Makefile.in) then you will want to include $(LIBS) in your link line, so that the configure script can inform your makefile of which libraries to link. You may also want to add $(LDLIBS) as well: perhaps this would be useful for users who needed to add extra link libraries that the configure script didn't find: it could be set on the make command line for example.