I have a library managed by autotools. I have the following line in Makefile.am , as well as other necessary configurations
lib_LTLIBRARIES = libstuff.la
My project also creates a program to run some test suites. This program is configured as follows:
noinst_PROGRAMS = runtests runtests_SOURCES = test/stuff.c stuff.h runtests_LDADD = libstuff.la
However, the program is always associated with the dynamic version of libstuff.la , which complicates some situations (for example, debugging with gdb ). How can I get a program to link to libstuff.a instead of libstuff.so or the equivalent dynamic library?
source share