blob: 30ded638db5a05409eea1443b902525280ab52e2 (
plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
#!gmake
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
sbindir = @sbindir@
mandir = @mandir@
localstatedir = @localstatedir@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@
etcdir = @sysconfdir@
builddir = @builddir@
DESTDIR = /
EXTRA_OBJ=@EXTRA_OBJ@
XSLTPROC = /usr/bin/xsltproc
INSTALLCMD = @INSTALL@
POPT_LIBS = @POPT_LIBS@
POPT_CFLAGS = @POPT_CFLAGS@
POPT_OBJ = @POPT_OBJ@
CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
-I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
-DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@
UTIL_OBJ = lib/util/idtree.o lib/util/db_wrap.o lib/util/strlist.o lib/util/util.o \
lib/util/util_time.o lib/util/util_file.o
CTDB_COMMON_OBJ = common/ctdb_io.o common/ctdb_util.o \
common/ctdb_ltdb.o common/ctdb_message.o common/cmdline.o \
lib/util/debug.o
CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
CTDB_CLIENT_OBJ = client/ctdb_client.o \
$(CTDB_COMMON_OBJ) $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \
@LIBREPLACEOBJ@ $(EXTRA_OBJ) @EVENTS_OBJ@
CTDB_TAKEOVER_OBJ = takeover/system.o takeover/ctdb_takeover.o
CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \
server/ctdb_recoverd.o server/ctdb_recover.o server/ctdb_freeze.o \
server/ctdb_tunables.o server/ctdb_monitor.o server/ctdb_server.o \
server/ctdb_control.o server/ctdb_call.o server/ctdb_ltdb_server.o \
server/ctdb_traverse.o $(CTDB_CLIENT_OBJ) \
$(CTDB_TAKEOVER_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
TEST_BINS=bin/ctdb_bench bin/ctdb_fetch @INFINIBAND_BINS@
BINS = bin/ctdb
SBINS = bin/ctdbd
DIRS = lib bin
all: showflags dirs doc $(CTDB_SERVER_OBJ) $(CTDB_CLIENT_OBJ) $(BINS) $(SBINS) $(TEST_BINS)
showflags:
@echo 'ctdb will be compiled with flags:'
@echo ' CFLAGS = $(CFLAGS)'
@echo ' LIBS = $(LIBS)'
.c.o:
@echo Compiling $*.c
@mkdir -p `dirname $@`
@$(CC) $(CFLAGS) -c $< -o $@
dirs:
@mkdir -p $(DIRS)
bin/ctdbd: $(CTDB_SERVER_OBJ)
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ $(CTDB_SERVER_OBJ) $(LIB_FLAGS)
bin/ctdb: $(CLIENT_OBJS) tools/ctdb.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tools/ctdb.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
bin/ctdb_bench: $(CTDB_CLIENT_OBJ) tests/ctdb_bench.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/ctdb_bench.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
bin/ctdb_fetch: $(CTDB_CLIENT_OBJ) tests/ctdb_fetch.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/ctdb_fetch.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
doc: doc/ctdb.1 doc/ctdb.1.html
doc/ctdb.1: doc/ctdb.1.xml
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
doc/ctdb.1.html: doc/ctdb.1.xml
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
clean:
rm -f *.o */*.o */*/*.o */*~
rm -f $(BINS) $(SBINS) $(TEST_BINS)
distclean: clean
rm -f *~ */*~
rm -rf bin
rm -f config.log config.status config.cache config.h
rm -f Makefile
install: all
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(sbindir)
mkdir -p $(DESTDIR)$(includedir)
mkdir -p $(DESTDIR)$(etcdir)/ctdb
mkdir -p $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 bin/ctdb $(DESTDIR)$(bindir)
${INSTALLCMD} -m755 bin/ctdbd $(DESTDIR)$(sbindir)
${INSTALLCMD} -m644 include/ctdb.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m644 include/ctdb_private.h $(DESTDIR)$(includedir) # for samba3
${INSTALLCMD} -m755 config/events $(DESTDIR)$(etcdir)/ctdb
${INSTALLCMD} -m755 config/functions $(DESTDIR)$(etcdir)/ctdb
${INSTALLCMD} -m755 config/statd-callout $(DESTDIR)$(etcdir)/ctdb
${INSTALLCMD} -m755 config/events.d/10.interface $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 config/events.d/40.vsftpd $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 config/events.d/50.samba $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 config/events.d/59.nfslock $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 config/events.d/60.nfs $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m755 tools/onnode.ssh $(DESTDIR)$(bindir)
${INSTALLCMD} -m755 tools/onnode.rsh $(DESTDIR)$(bindir)
if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -m 644 doc/ctdb.1 $(DESTDIR)$(mandir)/man1; fi
cd $(DESTDIR)$(bindir) && ln -sf onnode.ssh onnode
test: all
tests/run_tests.sh
valgrindtest: all
VALGRIND="valgrind -q --trace-children=yes" tests/run_tests.sh
realdistclean: distclean
rm -f configure config.h.in
|