4 CFLAGS = -g -W -Wall -O3
6 DEPCFLAGS = -MD -MF $(DEPSDIR)/$*.d -MP
7 ifeq ($(strip $(MEMMGR)), )
10 ifneq ($(strip $(KEYSWAP)), )
13 ifneq ($(strip $(NOPREFETCH)), )
14 CFLAGS += -DNOPREFETCH
16 ifneq ($(strip $(NOSUPERPAGE)), )
17 CFLAGS += -DNOSUPERPAGE
19 LIBS = @LIBS@ -lpthread -lm
22 all: test_atomics mtd mtclient mttest
24 %.o: %.c config.h $(DEPSDIR)/stamp
25 $(CXX) $(CFLAGS) $(DEPCFLAGS) -include config.h -c -o $@ $<
27 %.o: %.cc config.h $(DEPSDIR)/stamp
28 $(CXX) $(CFLAGS) $(DEPCFLAGS) -include config.h -c -o $@ $<
33 libjson.a: json.o string.o straccum.o str.o msgpack.o \
34 clp.o kvrandom.o compiler.o kvthread.o
38 KVTREES = query_masstree.o \
39 value_string.o value_array.o value_versioned_array.o \
42 mtd: mtd.o log.o checkpoint.o file.o misc.o $(KVTREES) \
44 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
46 mtclient: mtclient.o misc.o testrunner.o kvio.o libjson.a
47 $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
49 mttest: mttest.o misc.o checkpoint.o $(KVTREES) testrunner.o \
51 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
53 test_string: test_string.o string.o straccum.o compiler.o
54 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
56 test_atomics: test_atomics.o string.o straccum.o kvrandom.o \
57 json.o compiler.o kvio.o
58 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
60 jsontest: jsontest.o string.o straccum.o json.o compiler.o
61 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
63 msgpacktest: msgpacktest.o string.o straccum.o json.o compiler.o msgpack.o
64 $(CXX) $(CFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
68 GNUmakefile: GNUmakefile.in config.status
69 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
71 configure config.h.in: configure.ac
75 config.status: configure
76 ./configure @ac_configure_args@
82 stamp-h: config.h.in config.status
83 CONFIG_FILES= $(SHELL) ./config.status
87 rm -f mtd mtclient mttest test_string test_atomics *.o libjson.a
90 DEPFILES := $(wildcard $(DEPSDIR)/*.d)