Add links to libtool's recommendations for library versions.
[obnox/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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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:1:0 -export-symbols wtap.sym @LDFLAGS_SHAREDLIB@
34
35 if HAVE_WARNINGS_AS_ERRORS
36 AM_NON_GENERATED_CFLAGS = -Werror
37 endif
38
39 INCLUDES = -I$(srcdir)/..
40
41 CLEANFILES = \
42         libwiretap.a            \
43         libwiretap.la           \
44         libwiretap_generated.a  \
45         libwiretap_generated.la \
46         wtap.sym                \
47         *~
48
49 MAINTAINERCLEANFILES = \
50         $(GENERATED_FILES)      \
51         Makefile.in
52
53 #Since code generated by lex may trigger gcc warnings, we are now generating two
54 #libraries.  A single library is generated with the lex code without the barrier
55 #"stop on warning". An other library is generated from the remaining source
56 #files with the "stop on warning" barrier.
57 libwiretap_la_SOURCES = \
58         $(NONGENERATED_C_FILES) \
59         $(NONGENERATED_HEADER_FILES)
60 libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
61
62 libwiretap_generated_la_SOURCES = \
63         $(GENERATED_C_FILES)
64
65 EXTRA_DIST = \
66         README.developer        \
67         Makefile.common         \
68         Makefile.nmake          \
69         libwiretap.vcproj       \
70         wtap.def                \
71         $(GENERATOR_FILES)      \
72         $(GENERATED_FILES)
73
74 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
75 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la wtap.sym
76
77 RUNLEX = $(top_srcdir)/tools/runlex.sh
78
79 ascend_scanner_lex.h : ascend_scanner.c
80
81 k12text_lex.h : k12text.c
82
83 ascend.c ascend.h: ascend.y
84         @if [ -z "$(YACC)" ]; then \
85                 echo "Neither bison nor byacc has been found"; \
86                 exit 1; \
87         fi
88         $(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
89
90 # ABI compliance checker can be obtained from
91 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
92 # Checked using version 1.21.12
93 dumpabi: all abi-descriptor.xml
94         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz; \
95         mkdir abi-check-headers; cp *.h abi-check-headers/; \
96         abi-compliance-checker -l libwiretap -v1 `ls  .libs/libwiretap.so.?.?.?|sed 's/.*\.so\.//'` \
97                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml && \
98         cp -f abi_dumps/libwiretap/libwiretap_* .libs/; \
99         cd .libs; ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
100
101 checkapi:
102 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
103 ##      $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
104         $(PERL) ../tools/checkAPIs.pl -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)