Wireshark-dev: Re: [Wireshark-dev] Looking for explanation of build files
From: Stephen Fisher <[email protected]>
Date: Wed, 16 May 2012 09:31:52 -0600
---- On Wed, 16 May 2012 07:59:22 -0600 Beth  wrote ---- 

>Is there a description somewhere of what each of the files are for?  I've been poking around in the various docs, both the ones
>included with the Wireshark source and the ones based at http://wiki.wireshark.org/Development, and so far no luck.  Plenty
> of discussion on how to write your plugin's source code, but nothing on the build files.

We use GNU Autotools by default (on Unix), so the main documentation will be something like this: http://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Autotools-Introduction.html.  Since autotools is so complex, that documentation can be confusing.  We also use the command line tool nmake on Windows.  We've also introduced other methods of building such as cmake.

For autotools, the Makefile.common is where both autotools on Unix and nmake on Windows both pull a list of files to compile from.  This is included from Makefile.nmake (Windows) and Makefile.am (automake, part of autotools).  When you perform the normal the autotools build steps (autogen.sh, configure then GNU make), it creates the Makefile from Makefile.am (which included Makefile.common).  Now I realize that I forgot about Makefile.in (see, it's complicated; I've been coding for Wireshark since 2006!).  The wikipedia article on "GNU build system" (http://en.wikipedia.org/wiki/GNU_build_system) has a nice graphic and description that may be helpful.  It says "Automake helps to create portable Makefiles, which are in turn processed with the make utility. It takes its input as Makefile.am, and turns it into Makefile.in, which is used by the configure script to generate the file Makefile output."

The other files you mentioned, such as plugin.rc.in, are Wireshark specific.  Have you already read the README.plugins file in the doc directory of the source code?