frame: Fix Dereference of null pointer found by Clang analyzer
[metze/wireshark/wip.git] / Makefile.am.inc
1 # Makefile.am.inc
2 # Include file for Makefile.am files to get additional rules
3 #
4 # Wireshark - Network traffic analyzer
5 # By Gerald Combs <gerald@wireshark.org>
6 # Copyright 1998 Gerald Combs
7 #
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
22 AUTOMAKE_OPTIONS = -Wno-portability
23
24 lemon_srcdir = $(top_srcdir)/tools/lemon
25
26 LEMON ?= $(top_builddir)/tools/lemon/lemon$(EXEEXT)
27
28 RUNLEX ?= $(top_srcdir)/tools/runlex.sh
29
30 AM_CPPFLAGS = $(WS_CPPFLAGS) -I$(top_srcdir) -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
31
32 AM_CFLAGS = $(WS_CFLAGS)
33
34 if HAVE_WARNINGS_AS_ERRORS
35 AM_CFLAGS += -Werror
36 endif
37
38 GENERATED_CFLAGS = $(WS_CFLAGS)
39
40 AM_CXXFLAGS = $(WS_CXXFLAGS)
41
42 if HAVE_WARNINGS_AS_ERRORS
43 AM_CXXFLAGS += -Werror
44 endif
45
46 AM_LDFLAGS = $(WS_LDFLAGS)
47
48 AM_V_PERL = $(am__v_PERL_@AM_V@)
49 am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
50 am__v_PERL_0 = @echo "  PERL    " $@;
51
52 AM_V_AWK = $(am__v_AWK_@AM_V@)
53 am__v_AWK_ = $(am__v_AWK_@AM_DEFAULT_V@)
54 am__v_AWK_0 = @echo "  AWK     " $@;
55
56 AM_V_LEMON = $(am__v_LEMON_@AM_V@)
57 am__v_LEMON_ = $(am__v_LEMON_@AM_DEFAULT_V@)
58 am__v_LEMON_0 = @echo "  LEMON   " $@;
59
60 AM_V_RUNLEX = $(am__v_RUNLEX_@AM_V@)
61 am__v_RUNLEX_ = $(am__v_RUNLEX_@AM_DEFAULT_V@)
62 am__v_RUNLEX_0 = @echo "  RUNLEX  " $@;
63
64 AM_V_SED = $(am__v_SED_@AM_V@)
65 am__v_SED_ = $(am__v_SED_@AM_DEFAULT_V@)
66 am__v_SED_0 = @echo "  SED     " $@;
67
68 .l.c:
69         $(AM_V_RUNLEX)$(RUNLEX) "$(LEX)" "$(SED)" -o$@ $<
70
71 .def.sym:
72         $(AM_V_AWK)$(AWK) '/^EXPORTS$$/ {next;}; ${def_sym_filter_symbols} /^[^;]/ { print $$1;}' < $< > $@
73
74 # abi-compliance-checker descriptor
75 abi_incdirs = $(subst -I,NEWLINE,$(filter -I%,$(WS_CFLAGS) -I$(abs_top_srcdir) -I$(abs_srcdir)))
76 abi_sysdirs = $(subst -isystem,NEWLINE,$(filter -isystem%,$(WS_CFLAGS)))
77 INCLUDE_DIRS = $(abi_incdirs) $(abi_sysdirs)
78 abi-descriptor.xml: ../abi-descriptor.template
79         $(AM_V_SED)$(SED) \
80                 -e 's|@INCLUDE_DIRS@|$(INCLUDE_DIRS)|g' \
81                 -e 's/ *NEWLINE/\n    /g' \
82                 -e 's|@LIBRARY_OUTPUT_PATH@|{RELPATH}/.libs|' $< > $@