ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Patch] pragma warning

From: Sebastien Tandel <sebastien@xxxxxxxxx>
Date: Wed, 28 Mar 2007 17:01:06 +0200
Hi Ulf,

>> Maybe we should instead split Makefile.common up into three parts :
>>
>> First part : normal dissectors
>>
>> Second part : ANS2WRS generated dissectors  which take extra compile
>> time flags and definitions to suppress artefacts from the compiler.
>>
>> Third part : PIDL generated dissectors that once again take extra
>> compile parameters and definitions.
>>   
>>     
> Sounds like a reasonable solution. It would also have the advantage that 
> we get a list of generated dissectors, which we currently don't have.
>
> But: Is there a "makefile magic", so you can have different CFLAGS 
> settings for the different lists? Remember that we are using implicit 
> rules here.
>
> Having three lists shouldn't be difficult to add, but I don't know how 
> to get the "compile logic" for it - however, I'm really not an expert on 
> this.
>   

I made it partly for the Unix side. (Makefile.common and Makefile.am
affected).
The Makefile is, in fact, building now four libraries :
- asn dissectors : libasndissectors.la
- pidl dissectors : libpidldissectors.la
- normal dissectors : libdissectors.la *and* libcleandissectors.la. I
separated it in two libraries temporarily. The source files used to
build libcleandissectors.la do not generate warning anymore and the
-Werror is used to compile them. If we patch a dissector and it doesn't
generate warning anymore, we have to move the filename dissector from
DISSECTOR_SRC to CLEAN_DISSECTOR_SRC in epan/dissectors/Makefile.common.

You can define specific cflags with, for example,
libpidldissectors_la_CFLAGS.

The problem is  that I really don't know how to do this for Makefile.nmake.
Maybe the attached patch will give you some ideas ;)


Regards,
Sebastien Tandel

Attachment: sources-per-dissector-type.diff.gz
Description: application/gzip