From Stephen Donnelly via bug 2235:
[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., 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 libwiretap_la_LDFLAGS = -version-info 0:1:0 @LDFLAGS_SHAREDLIB@
33
34 if HAVE_WARNINGS_AS_ERRORS
35 AM_NON_GENERATED_CFLAGS = -Werror
36 endif
37
38 CLEANFILES = \
39         libwiretap.a            \
40         libwiretap.la           \
41         libwiretap_generated.a  \
42         libwiretap_generated.la \
43         *~
44
45 MAINTAINERCLEANFILES = \
46         $(GENERATED_FILES)      \
47         Makefile.in
48
49 #Since code generated by lex may trigger gcc warnings, we are now generating two
50 #libraries.  A single library is generated with the lex code without the barrier
51 #"stop on warning". An other library is generated from the remaining source
52 #files with the "stop on warning" barrier.
53 libwiretap_la_SOURCES = \
54         $(NONGENERATED_C_FILES) \
55         $(NONGENERATED_HEADER_FILES)
56 libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
57
58 libwiretap_generated_la_SOURCES = \
59         $(GENERATED_C_FILES)
60
61 EXTRA_DIST = \
62         README.developer        \
63         Makefile.common         \
64         Makefile.nmake          \
65         wtap.def                \
66         file_util.c             \
67         $(GENERATOR_FILES)      \
68         $(GENERATED_FILES)
69
70 libwiretap_la_LIBADD = libwiretap_generated.la
71 libwiretap_la_DEPENDENCIES = libwiretap_generated.la
72
73 RUNLEX = $(top_srcdir)/tools/runlex.sh
74
75 ascend-scanner_lex.h : ascend-scanner.c
76
77 k12text_lex.h : k12text.c
78
79 ascend-grammar.c ascend-grammar.h: ascend-grammar.y
80         @if [ -z "$(YACC)" ]; then \
81                 echo "Neither bison nor byacc has been found"; \
82                 exit 1; \
83         fi
84         $(YACC) -d -p ascend -o ascend-grammar.c $(srcdir)/ascend-grammar.y