check USE_JEMALLOC flag in Makefile.am

This commit is contained in:
c9s 2014-05-21 22:00:30 +08:00
parent a3866114e3
commit e48538c526
2 changed files with 9 additions and 0 deletions

View file

@ -6,6 +6,10 @@ libr3_la_SOURCES = node.c edge.c str.c token.c zmalloc.c
libr3_la_LIBADD=$(DEPS_LIBS) libr3_la_LIBADD=$(DEPS_LIBS)
AM_CFLAGS=$(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -Wall AM_CFLAGS=$(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -Wall
if USE_JEMALLOC
AM_CFLAGS += -ljemalloc
endif
if ENABLE_DEBUG if ENABLE_DEBUG
AM_CFLAGS += -ggdb -fprofile-arcs -ftest-coverage AM_CFLAGS += -ggdb -fprofile-arcs -ftest-coverage
endif endif

View file

@ -8,6 +8,7 @@ TESTS = check_tree
AM_CFLAGS = -ggdb $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@ 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@ AM_LDFLAGS = $(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@
noinst_HEADERS = \ noinst_HEADERS = \
bench.h \ bench.h \
$(NULL) $(NULL)
@ -16,6 +17,10 @@ dist_noinst_DATA = \
bench_str.csv \ bench_str.csv \
$(NULL) $(NULL)
if USE_JEMALLOC
AM_CFLAGS += -ljemalloc
endif
if ENABLE_GRAPHVIZ if ENABLE_GRAPHVIZ
TESTS += check_gvc TESTS += check_gvc
check_gvc_SOURCES = check_gvc.c bench.c check_gvc_SOURCES = check_gvc.c bench.c