如何告诉Automake构建一个不被安装的动态模块?
pkglib_LTLIBRARIES = mywrapper.la
mywrapper_la_LDFLAGS = -no-undefined -module -avoid-version
导致 mywrapper.so 安装到pkglibdir
.
noinst_LTLIBRARIES = mywrapper.la
mywrapper_la_LDFLAGS = -no-undefined -module -avoid-version
causes static改为构建便利库。
所讨论的动态模块仅用于运行测试套件,因此不会被分发。
我有同样的问题。这就是我所做的,包括对自己的愤怒评论,以供将来参考:
# The rpath is necessary because stoopid libtool won't build a shared library
# if it's noinst_, because what POSSIBLE reason could you have to do that?
TEST_PLUGIN_LIBTOOL_FLAGS = \
-module \
-shared \
-avoid-version \
-export-symbols-regex "<whatever symbols you need to export>" \
-rpath $(abs_builddir)
noinst_LTLIBRARIES = mywrapper.la
mywrapper_la_LDFLAGS = $(TEST_PLUGIN_LIBTOOL_FLAGS)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)