5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 2001 Gerald Combs
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 include ../../Makefile.am.inc
26 if HAVE_WARNINGS_AS_ERRORS
27 AM_NON_GENERATED_CFLAGS = -Werror
30 include Makefile.common
32 noinst_LTLIBRARIES = libdfilter_generated.la libdfilter.la
37 libdfilter_generated.a \
38 libdfilter_generated.la \
43 $(NODIST_GENERATED_FILES)
45 MAINTAINERCLEANFILES = \
47 $(NODIST_GENERATED_FILES) \
50 AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON)
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 libdfilter_la_SOURCES = $(NONGENERATED_C_FILES) $(NONGENERATED_HEADER_FILES)
57 libdfilter_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
59 libdfilter_generated_la_SOURCES = \
60 $(GENERATED_C_FILES) \
61 $(GENERATED_HEADER_FILES)
63 nodist_libdfilter_generated_la_SOURCES = \
64 $(NODIST_GENERATED_C_FILES) \
65 $(NODIST_GENERATED_HEADER_FILES)
67 libdfilter_la_LIBADD = libdfilter_generated.la
68 libdfilter_la_DEPENDENCIES = libdfilter_generated.la
75 RUNLEX=$(top_srcdir)/tools/runlex.sh
77 scanner_lex.h : scanner.c
80 LEMON=../../tools/lemon
83 grammar.c : $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon
84 $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon || \
85 (rm -f grammar.c grammar.h ; false)
88 $(PERL) ../../tools/checkAPIs.pl -g termoutput -build \
90 $(NONGENERATED_C_FILES)