开发者

.sym not being generated by -export-symbols in Makefile.am

I am trying开发者_运维问答 to build a shared library by editing Wireshark's Makefile.am to create a "libtshark" ... to do this, I am trying to build a tshark_lib.c which is the same as tshark.c with main() stripped out of it.

So I have edited Makefile.am to include include the following in an attempt to build the shared libtshark library:

lib_LTLIBRARIES = libtshark.la
libtshark_la_LDFLAGS = -version-info 0:1:0 -export-symbols libtshark.sym @LDFLAGS_SHAREDLIB@
libtshark_la_SOURCES = \
    $(WIRESHARK_COMMON_SRC) \
    $(SHARK_COMMON_CAPTURE_SRC) \
    $(TSHARK_TAP_SRC)   \
    capture_opts.c      \
    capture_sync.c      \
    tempfile.c      \
    tshark-tap-register.c   \
    tshark_lib.c

# Libraries and plugin flags with which to link tshark.
libtshark_la_LIBADD = \
    wiretap/libwiretap.la       \
    epan/libwireshark.la        \
    wsutil/libwsutil.la     \
    @SSL_LIBS@          \
    $(plugin_ldadd)         \
    @PCRE_LIBS@         \
    @GLIB_LIBS@ -lm         \
    @PCAP_LIBS@         \
    @SOCKET_LIBS@           \
    @NSL_LIBS@          \
    @C_ARES_LIBS@           \
    @ADNS_LIBS@         \
    @KRB5_LIBS@         \
    @CORESERVICES_FRAMEWORKS@   \
    @LIBGCRYPT_LIBS@        \
    @LIBGNUTLS_LIBS@        \
    @LIBSMI_LDFLAGS@
#tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)

libtshark_la_DEPENDENCIES = \
    ${top_builddir}/epan/libwireshark.la \
    ${top_builddir}/wsutil/libwsutil.la \
    ${top_builddir}/wiretap/libwiretap.la \
        libtshark.sym

However, when I try to build the code now, I get the following error:

make[2]: *** No rule to make target `libtshark.sym', needed by `libtshark.la'.  Stop.

For some reason, it is not using my 'libtshark_la_LDFLAGS' which contains '-export-symbols libtshark.sym' ... does anyone know what I might be missing?

Here is the entire Makefile.am, which is too long for stackoverflow: Makefile.am


it turns out that the .sym file is pre-generated by wireshark scripts to determine which symbols to export.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜