From e48538c52690836eb5b762fd4848ca91a7aa5c81 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 21 May 2014 22:00:30 +0800 Subject: [PATCH] check USE_JEMALLOC flag in Makefile.am --- src/Makefile.am | 4 ++++ tests/Makefile.am | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 2e6234c..f28be76 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,10 @@ libr3_la_SOURCES = node.c edge.c str.c token.c zmalloc.c libr3_la_LIBADD=$(DEPS_LIBS) AM_CFLAGS=$(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -Wall +if USE_JEMALLOC +AM_CFLAGS += -ljemalloc +endif + if ENABLE_DEBUG AM_CFLAGS += -ggdb -fprofile-arcs -ftest-coverage endif diff --git a/tests/Makefile.am b/tests/Makefile.am index d0b1388..21dd302 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,6 +8,7 @@ TESTS = check_tree AM_CFLAGS = -ggdb $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@ AM_LDFLAGS = $(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@ + noinst_HEADERS = \ bench.h \ $(NULL) @@ -16,6 +17,10 @@ dist_noinst_DATA = \ bench_str.csv \ $(NULL) +if USE_JEMALLOC +AM_CFLAGS += -ljemalloc +endif + if ENABLE_GRAPHVIZ TESTS += check_gvc check_gvc_SOURCES = check_gvc.c bench.c