With Automake you can build a shared library (.so
) like this:
lib_LTLIBRARIES = libyeah.la
libyeah_la_SOURCES = yeah.c
Then libyeah.so
is installed to $(libdir)
with make install
.
When you specify the noinst_
prefix (instead of lib_
) to avoid installing the library, it's not built as a shared object (only an archive, .a
). It seems that the library is never actually linked.
I need a shared object, without installing it, for project tests (a test plugin which is dynamically loaded by the test program).
I tried to add -module
and -shared
to libyeah_la_LDFLAGS
without success.