summaryrefslogtreecommitdiff
path: root/epan/Makefile.am
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-27 02:28:17 +0000
committerJoão Valverde <j@v6e.pt>2016-01-28 18:13:48 +0000
commit265a41e14da6b3ebf1e49e726eee62d1372110bf (patch)
treef1a524f8e66ebd43691de84649f231f32ee125f6 /epan/Makefile.am
parent97a1a50e200a6c50e0014dde7e8ec932c30190a1 (diff)
downloadwireshark-265a41e14da6b3ebf1e49e726eee62d1372110bf.tar.gz
autotools: Don't use "user variables" to set build flags
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/Makefile.am')
-rw-r--r--epan/Makefile.am34
1 files changed, 12 insertions, 22 deletions
diff --git a/epan/Makefile.am b/epan/Makefile.am
index 0749d60a99..302d650f46 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -21,7 +21,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include ../Makefile.am.inc
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
if HAVE_LIBLUA
wslua_lib = wslua/libwslua.la
@@ -39,23 +40,14 @@ DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
ACLOCAL_AMFLAGS = `../aclocal-flags`
+AM_CPPFLAGS += -I$(builddir)/wslua $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \
+ $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) $(KRB5_CFLAGS)
+
noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
lib_LTLIBRARIES = libwireshark.la
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libwireshark_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
-include Makefile.common
-
-AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) -I$(builddir)/wslua \
- @LUA_CFLAGS@ $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \
- $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) $(PY_CFLAGS)
-
-AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_NON_GENERATED_CFLAGS += -Werror
-endif
-
#Since code generated by lex may trigger gcc warnings, we are now generating two
#libraries. A single library is generated with the lex code without the barrier
#"stop on warning". An other library is generated from the remaining source
@@ -63,11 +55,12 @@ endif
libwireshark_la_SOURCES = \
$(LIBWIRESHARK_SRC) \
$(LIBWIRESHARK_INCLUDES)
-libwireshark_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
+libwireshark_la_CPPFLAGS = $(AM_CPPFLAGS) -DWS_BUILD_DLL
libwireshark_generated_la_SOURCES = \
$(LIBWIRESHARK_GENERATED_C_FILES) \
$(LIBWIRESHARK_GENERATED_HEADER_FILES)
+libwireshark_generated_la_CFLAGS = $(GENERATED_CFLAGS)
nodist_libwireshark_generated_la_SOURCES = \
$(NODIST_LIBWIRESHARK_GENERATED_C_FILES) \
@@ -119,6 +112,9 @@ MAINTAINERCLEANFILES = \
$(LIBWIRESHARK_GENERATED_HEADER_FILES) \
Makefile.in
+BUILT_SOURCES = \
+ dtd_grammar.h
+
#
# Add the object files for missing routines, if any.
#
@@ -165,25 +161,19 @@ exntest: exntest.o except.o
test-programs: $(EXTRA_PROGRAMS) exntest
cd wmem && $(MAKE) $@
-RUNLEX=$(top_srcdir)/tools/runlex.sh
-
diam_dict_lex.h: diam_dict.c
dtd_parse_lex.h: dtd_parse.c
-dtd_parse.lo: dtd_grammar.h
-
dtd_preparse_lex.h: dtd_preparse.c
radius_dict_lex.h: radius_dict.c
uat_load_lex.h: uat_load.c
-LEMON=../tools/lemon
-
dtd_grammar.h: dtd_grammar.c
-dtd_grammar.c : $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
- $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) T=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
+dtd_grammar.c : $(LEMON) $(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
+ $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
tvbtest.o exntest.o oids_test.o: exceptions.h