-
Notifications
You must be signed in to change notification settings - Fork 115
/
GNUmakefile.in
104 lines (80 loc) · 2.64 KB
/
GNUmakefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
AR = ar
CC = @CC@
CXX = @CXX@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ -pthread
RANLIB = @RANLIB@
DEPSDIR := .deps
DEPCFLAGS = -MD -MF $(DEPSDIR)/$*.d -MP
ifeq ($(strip $(MEMMGR)), )
MEMMGR = @MALLOC_LIBS@
endif
ifneq ($(strip $(KEYSWAP)), )
CPPFLAGS += -DKEYSWAP
endif
ifneq ($(strip $(NOPREFETCH)), )
CPPFLAGS += -DNOPREFETCH
endif
ifneq ($(strip $(NOSUPERPAGE)), )
CPPFLAGS += -DNOSUPERPAGE
endif
LIBS = @LIBS@ -lm
LDFLAGS = @LDFLAGS@
all: test_atomics mtd mtclient mttest
%.o: %.c config.h $(DEPSDIR)/stamp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEPCFLAGS) -include config.h -c -o $@ $<
%.o: %.cc config.h $(DEPSDIR)/stamp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEPCFLAGS) -include config.h -c -o $@ $<
%.S: %.o
objdump -S $< > $@
libjson.a: json.o string.o straccum.o str.o msgpack.o \
clp.o kvrandom.o compiler.o memdebug.o kvthread.o
@rm -f $@
$(AR) cr $@ $^
$(RANLIB) $@
KVTREES = query_masstree.o \
value_string.o value_array.o value_versioned_array.o \
string_slice.o
mtd: mtd.o log.o checkpoint.o file.o misc.o $(KVTREES) \
kvio.o libjson.a
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
mtclient: mtclient.o misc.o testrunner.o kvio.o libjson.a
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
mttest: mttest.o misc.o checkpoint.o $(KVTREES) testrunner.o \
kvio.o libjson.a
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
test_string: test_string.o string.o straccum.o compiler.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
test_atomics: test_atomics.o string.o straccum.o kvrandom.o \
json.o compiler.o kvio.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
jsontest: jsontest.o string.o straccum.o json.o compiler.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
msgpacktest: msgpacktest.o string.o straccum.o json.o compiler.o msgpack.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
scantest: scantest.o compiler.o misc.o $(KVTREES) libjson.a
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
unit-mt: unit-mt.o compiler.o misc.o libjson.a
$(CXX) $(CXXFLAGS) -o $@ $^ $(MEMMGR) $(LDFLAGS) $(LIBS)
config.h: stamp-h
GNUmakefile: GNUmakefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
configure config.h.in: configure.ac
autoreconf -i
touch config.h.in
config.status: configure
./configure @ac_configure_args@
$(DEPSDIR)/stamp:
mkdir -p $(DEPSDIR)
touch $@
stamp-h: config.h.in config.status
CONFIG_FILES= $(SHELL) ./config.status
echo > stamp-h
clean:
rm -f mtd mtclient mttest test_string test_atomics *.o libjson.a
rm -rf .deps
DEPFILES := $(wildcard $(DEPSDIR)/*.d)
ifneq ($(DEPFILES),)
include $(DEPFILES)
endif
.PHONY: clean all