开发者

How to switch between shared library output and executable output in libtool/autotools projects?

开发者 https://www.devze.com 2023-01-29 19:13 出处:网络
I have some autotools-managed project. Apart from source code files it has autogen.sh, configure.ac, Makefile.am, src/Makefile.am.

I have some autotools-managed project. Apart from source code files it has autogen.sh, configure.ac, Makefile.am, src/Makefile.am.

  1. 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?

  2. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消