1.99.6 → 1.99.7.
[metze/wireshark/wip.git] / wiretap / Makefile.am
1 # Makefile.am
2 # Automake file for Wiretap
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 include ../Makefile.am.inc
23
24 ACLOCAL_AMFLAGS = `../aclocal-flags`
25
26 include Makefile.common
27
28 noinst_LTLIBRARIES = libwiretap_generated.la
29 lib_LTLIBRARIES = libwiretap.la
30 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
31 libwiretap_la_LDFLAGS = -version-info 0:7:0 @LDFLAGS_SHAREDLIB@
32
33 AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
34
35 if HAVE_WARNINGS_AS_ERRORS
36 AM_NON_GENERATED_CFLAGS += -Werror
37 endif
38
39 AM_CPPFLAGS = -I$(srcdir)/..
40
41 CLEANFILES = \
42         libwiretap.a            \
43         libwiretap.la           \
44         libwiretap_generated.a  \
45         libwiretap_generated.la \
46         *~
47
48 MAINTAINERCLEANFILES = \
49         $(GENERATED_FILES)      \
50         Makefile.in
51
52 #Since code generated by lex may trigger gcc warnings, we are now generating two
53 #libraries.  A single library is generated with the lex code without the barrier
54 #"stop on warning". An other library is generated from the remaining source
55 #files with the "stop on warning" barrier.
56 libwiretap_la_SOURCES = \
57         $(NONGENERATED_C_FILES) \
58         $(NONGENERATED_HEADER_FILES)
59 libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
60
61 libwiretap_generated_la_SOURCES = \
62         $(GENERATED_C_FILES)
63
64 EXTRA_DIST = \
65         README.airmagnet        \
66         README.developer        \
67         Makefile.common         \
68         Makefile.nmake          \
69         $(GENERATOR_FILES)      \
70         $(GENERATED_FILES)
71
72 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
73 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
74
75 RUNLEX = $(top_srcdir)/tools/runlex.sh
76
77 k12text_lex.h : k12text.c
78
79 ascend_scanner_lex.h : ascend_scanner.c
80
81 ascend_scanner.c: ascend.h
82
83 ascend.h: ascend.c
84
85 ascend.c: ascend.y
86         @if [ -z "$(YACC)" ]; then \
87                 echo "Neither bison nor byacc has been found"; \
88                 exit 1; \
89         fi
90         $(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
91
92 # ABI compliance checker can be obtained from
93 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
94 # Checked using version 1.21.12
95 dumpabi-libwiretap: all abi-descriptor.xml
96         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
97         mkdir abi-check-headers
98         cp *.h ../ws_symbol_export.h abi-check-headers/
99         abi-compliance-checker -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
100                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
101                 cat logs/libwiretap/[0-9]*/log.txt
102         cp -f abi_dumps/libwiretap/libwiretap_* .libs/
103         cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
104
105 checkapi:
106 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
107 ##      $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput \
108         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
109         -sourcedir=$(srcdir) \
110         $(NONGENERATED_C_FILES) $(GENERATOR_FILES)