Wireshark-dev: Re: [Wireshark-dev] Makefiles for private dissectors

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Tue, 30 Aug 2016 10:28:53 +0000

Hi,

You need to edit Custom.m4 and Custom.make in the plugins folder. Fror packaging on windows you also have to look for custom files in /packaging/nsis

Regards

Anders

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Not Me
Sent: den 30 augusti 2016 12:10
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Makefiles for private dissectors

 

Dear Wireshark devs,

 

I'm trying to build my own dissectors, and followed a manual where it put all of these in a folder called private_plugins and uses a CMakeListsCustom.txt, which I put at the bottom of this mail (simply setting CUSTOM_PLUGIN_SRC_DIR to foo and bar).

 

I got everything to work, an executable built, and my private dissectors work fine as well. Now, I noticed I am able to package a .dmg file on osx (and an rpm as well) using make osx-package (or make rpm-package). However, I need to switch to Makefiles for that. I noticed my private plugins are no longer picked up, and not part of the actual package built.

 

I searched through many examples on the web, also the doc/ subfolder, and tried many things. But I'm not able to get it to work. Would be great if someone could tell me how to get it working.

 

Maybe I show tell what I currently have... (although I tried many other things).

 

$ cat plugins/Custom.make

#

 

_CUSTOM_SUBDIRS_ = \

            ../private_plugins/foo \

            ../private_plugins/bar \

 

_CUSTOM_EXTRA_DIST_ = \

            Custom.m4 \

            Custom.make

 

_CUSTOM_plugin_ldadd_ = \

            -dlopen ../private_plugins/foo/foo.la \

            -dlopen ../private_plugins/bar/bar.la

 

_CUSTOM_PLUGIN_SRC_ = \

    ../private_plugins/foo/packet-foo.c \

    ../private_plugins/bar/packet-bar.c

 

Configure:

I don't see the configure script output something like "config.status: creating private_plugins/foo/Makefile", which I think it should somehow?

 

Make:

make fails because there's no Makefile

 

Making all in plugins

Making all in ../private_plugins/foo

make[3]: *** No rule to make target `all'.  Stop.

make[2]: *** [all-recursive] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

 

 

 

// This used to work for cmake:

 

$ cat CMakeListsCustom.txt

set(CUSTOM_PLUGIN_SRC_DIR

    private_plugins/foo

    private_plugins/bar

)

 

Thanks,

William.