I have some autotools-managed project. Apart from source code files it has autogen.sh, configure.ac, Makefile.am, src/Makefile.am.
How to find out looking at these file if it is a library or application? For example, in Qt I have "TEMPLATE = app" or "TEMPLATE = lib" which decides 开发者_StackOverflow社区this. What is it in autotools?
How to switch from generating a executable application to generating the library and back?
In your Makefile.am you should have something that looks like:
bin_PROGRAMS = foo (or sbin or something else depending on where it lands)
Change that to:
lib_LTLIBRARIES = foo.la
精彩评论