1.11.2 → 1.11.3.
[metze/wireshark/wip.git] / wiretap / Makefile.am
1 # Makefile.am
2 # Automake file for Wiretap
3 #
4 # $Id$
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
24 include ../Makefile.am.inc
25
26 ACLOCAL_AMFLAGS = `../aclocal-flags`
27
28 include Makefile.common
29
30 noinst_LTLIBRARIES = libwiretap_generated.la
31 lib_LTLIBRARIES = libwiretap.la
32 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
33 libwiretap_la_LDFLAGS = -version-info 0:3:0 @LDFLAGS_SHAREDLIB@
34
35 AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
36
37 if HAVE_WARNINGS_AS_ERRORS
38 AM_NON_GENERATED_CFLAGS += -Werror
39 endif
40
41 AM_CPPFLAGS = -I$(srcdir)/..
42
43 CLEANFILES = \
44         libwiretap.a            \
45         libwiretap.la           \
46         libwiretap_generated.a  \
47         libwiretap_generated.la \
48         *~
49
50 MAINTAINERCLEANFILES = \
51         $(GENERATED_FILES)      \
52         Makefile.in
53
54 #Since code generated by lex may trigger gcc warnings, we are now generating two
55 #libraries.  A single library is generated with the lex code without the barrier
56 #"stop on warning". An other library is generated from the remaining source
57 #files with the "stop on warning" barrier.
58 libwiretap_la_SOURCES = \
59         $(NONGENERATED_C_FILES) \
60         $(NONGENERATED_HEADER_FILES)
61 libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
62
63 libwiretap_generated_la_SOURCES = \
64         $(GENERATED_C_FILES)
65
66 EXTRA_DIST = \
67         README.airmagnet        \
68         README.developer        \
69         Makefile.common         \
70         Makefile.nmake          \
71         libwiretap.vcproj       \
72         $(GENERATOR_FILES)      \
73         $(GENERATED_FILES)
74
75 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
76 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
77
78 RUNLEX = $(top_srcdir)/tools/runlex.sh
79
80 k12text_lex.h : k12text.c
81
82 ascend_scanner_lex.h : ascend_scanner.c
83
84 ascend_scanner.c: ascend.h
85
86 ascend.h: ascend.c
87
88 ascend.c: ascend.y
89         @if [ -z "$(YACC)" ]; then \
90                 echo "Neither bison nor byacc has been found"; \
91                 exit 1; \
92         fi
93         $(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
94
95 # ABI compliance checker can be obtained from
96 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
97 # Checked using version 1.21.12
98 dumpabi-libwiretap: all abi-descriptor.xml
99         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
100         mkdir abi-check-headers
101         cp *.h ../ws_symbol_export.h abi-check-headers/
102         abi-compliance-checker -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
103                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
104                 cat logs/libwiretap/[0-9]*/log.txt
105         cp -f abi_dumps/libwiretap/libwiretap_* .libs/
106         cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
107
108 checkapi:
109 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
110 ##      $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
111         $(PERL) ../tools/checkAPIs.pl -g termoutput -build $(NONGENERATED_C_FILES) $(GENERATOR_FILES)