-LDADDS = $(top_builddir)/libmemcached/libmemcached.la
+LDADDS = $(top_builddir)/libmemcached/libmemcached.la libutilities.la
bin_PROGRAMS = memcat memdump memcp memstat memrm memflush memslap memerror
generator.h \
execute.h
-memcat_SOURCES = memcat.c utilities.c
+noinst_LTLIBRARIES= libutilities.la libgenexec.la
+
+libutilities_la_SOURCES= utilities.c
+libgenexec_la_SOURCES= generator.c execute.c
+
+memcat_SOURCES = memcat.c
memcat_LDADD = $(LDADDS)
memcat_LDFLAGS = -rpath $(pkglibdir)
-memcp_SOURCES = memcp.c utilities.c
+memcp_SOURCES = memcp.c
memcp_LDADD = $(LDADDS)
memcp_LDFLAGS = -rpath $(pkglibdir)
-memdump_SOURCES = memdump.c utilities.c
+memdump_SOURCES = memdump.c
memdump_LDADD = $(LDADDS)
memdump_LDFLAGS = -rpath $(pkglibdir)
-memstat_SOURCES = memstat.c utilities.c
+memstat_SOURCES = memstat.c
memstat_LDADD = $(LDADDS)
memstat_LDFLAGS = -rpath $(pkglibdir)
-memrm_SOURCES = memrm.c utilities.c
+memrm_SOURCES = memrm.c
memrm_LDADD = $(LDADDS)
memrm_LDFLAGS = -rpath $(pkglibdir)
-memflush_SOURCES = memflush.c utilities.c
+memflush_SOURCES = memflush.c
memflush_LDADD = $(LDADDS)
memflush_LDFLAGS = -rpath $(pkglibdir)
-memerror_SOURCES = memerror.c utilities.c
+memerror_SOURCES = memerror.c
memerror_LDADD = $(LDADDS)
memerror_LDFLAGS = -rpath $(pkglibdir)
-memslap_SOURCES = memslap.c utilities.c generator.c execute.c
-memslap_LDADD = $(LDADDS) -lpthread
-memslap_LDFLAGS = -rpath $(pkglibdir)
+memslap_SOURCES = memslap.c
+memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+memslap_LDADD = $(LDADDS) $(PTHREAD_LIBS) libgenexec.la
+memslap_LDFLAGS = $(AM_LDFLAGS) -rpath $(pkglibdir)
test-start-server:
memflush --servers=localhost
noinst_HEADERS = test.h server.h ketama_test_cases.h
noinst_PROGRAMS = testapp testplus udptest atomsmasher startservers
+noinst_LTLIBRARIES= libserver.la libtest.la
-testapp_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION} ${NO_STRICT_ALIASING}
-testapp_SOURCES = test.c function.c server.c ../clients/generator.c ../clients/execute.c
-testapp_LDADD = $(LDADDS)
+libserver_la_SOURCES= server.c
+libtest_la_SOURCES= test.c
-testplus_SOURCES = test.c plus.cpp server.c
-testplus_LDADD = $(LDADDS)
+testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
+testapp_SOURCES = function.c
+testapp_LDADD = $(LDADDS) $(top_builddir)/clients/libgenexec.la libtest.la libserver.la
-udptest_SOURCES = test.c udp.c server.c
-udptest_LDADD = $(LDADDS)
+testplus_SOURCES = plus.cpp
+testplus_LDADD = $(LDADDS) libtest.la libserver.la
-atomsmasher_SOURCES = test.c atomsmasher.c server.c ../clients/generator.c ../clients/execute.c
-atomsmasher_LDADD = $(LDADDS)
+udptest_SOURCES = udp.c
+udptest_LDADD = $(LDADDS) libtest.la libserver.la
-startservers_SOURCES = start.c server.c
-startservers_LDADD = $(LDADDS)
+atomsmasher_SOURCES = atomsmasher.c
+atomsmasher_LDADD = $(LDADDS) $(top_builddir)/clients/libgenexec.la libtest.la libserver.la
+
+startservers_SOURCES = start.c
+startservers_LDADD = $(LDADDS) libserver.la
record:
./testapp > output.res
libtool --mode=execute valgrind --tool=helgrind testapp
helgrind-slap:
- libtool --mode=execute valgrind --tool=helgrind ../clients/memslap --server=localhost --concurrency=30
+ libtool --mode=execute valgrind --tool=helgrind ${top_builddir}/clients/memslap --server=localhost --concurrency=30
test-no-outputdiff: testapp
./testapp > /dev/null