2006-11-18 02:41:20 +03:00
#!gmake
2007-07-14 04:58:51 +04:00
2008-07-09 05:08:44 +04:00
2006-11-18 02:41:20 +03:00
CC = @CC@
2010-05-20 10:27:40 +04:00
AR = ar
ARFLAGS = cru
RANLIB = ranlib
2006-11-18 02:41:20 +03:00
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
includedir = @includedir@
2010-08-06 12:12:13 +04:00
docdir = @docdir@
2006-11-18 02:41:20 +03:00
libdir = @libdir@
bindir = @bindir@
2007-05-29 09:52:03 +04:00
sbindir = @sbindir@
2007-06-09 09:21:30 +04:00
mandir = @mandir@
2007-04-30 00:42:23 +04:00
localstatedir = @localstatedir@
2009-02-04 02:15:57 +03:00
logdir = @LOGDIR@
2010-08-18 03:46:31 +04:00
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@:@teventdir@:
2006-11-18 02:41:20 +03:00
srcdir = @srcdir@
2007-05-29 09:20:41 +04:00
etcdir = @sysconfdir@
2006-11-18 02:41:20 +03:00
builddir = @builddir@
2007-05-28 00:48:18 +04:00
DESTDIR = /
2006-11-18 02:41:20 +03:00
EXTRA_OBJ = @EXTRA_OBJ@
2007-06-09 02:41:36 +04:00
XSLTPROC = /usr/bin/xsltproc
2007-06-09 09:21:30 +04:00
INSTALLCMD = @INSTALL@
2006-11-18 02:41:20 +03:00
2007-05-02 23:21:14 +04:00
POPT_LIBS = @POPT_LIBS@
POPT_CFLAGS = @POPT_CFLAGS@
POPT_OBJ = @POPT_OBJ@
2012-03-21 06:18:10 +04:00
TALLOC_LIBS = @TALLOC_LIBS@
TALLOC_CFLAGS = @TALLOC_CFLAGS@
TALLOC_OBJ = @TALLOC_OBJ@
2012-03-21 08:56:45 +04:00
TEVENT_LIBS = @TEVENT_LIBS@
TEVENT_CFLAGS = @TEVENT_CFLAGS@
TEVENT_OBJ = @TEVENT_OBJ@
2012-03-21 07:45:56 +04:00
TDB_LIBS = @TDB_LIBS@
TDB_CFLAGS = @TDB_CFLAGS@
TDB_OBJ = @TDB_OBJ@
2011-10-20 16:17:45 +04:00
SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
2011-07-13 20:11:23 +04:00
PMDA_LIBS = -lpcp -lpcp_pmda
PMDA_INSTALL = @CTDB_PMDA_INSTALL@
PMDA_DEST_DIR = /var/lib/pcp/pmdas
2012-02-06 15:50:05 +04:00
CFLAGS = @CPPFLAGS@ -g -I$( srcdir) /include -Iinclude -Ilib -Ilib/util -I$( srcdir) \
2012-03-21 07:45:56 +04:00
$( TALLOC_CFLAGS) $( TEVENT_CFLAGS) $( TDB_CFLAGS) -I@libreplacedir@ \
2008-10-14 18:08:29 +04:00
-DVARDIR= \" $( localstatedir) \" -DETCDIR= \" $( etcdir) \" \
2009-02-04 02:15:57 +03:00
-DLOGDIR= \" $( logdir) \" \
2011-09-03 03:30:08 +04:00
-DUSE_MMAP= 1 -DTEVENT_DEPRECATED_QUIET= 1 @CFLAGS@ -Wno-format-zero-length $( POPT_CFLAGS) \
-fPIC
LDSHFLAGS = -fPIC -shared
#LDSHFLAGS=-fPIC -shared -Wl,-Bsymbolic -Wl,-z,relo -Wl,-Bsymbolic-funtions -Wl,--as-needed -Wl,-z,defs
SHLD = ${ CC } ${ CFLAGS } ${ LDSHFLAGS } -o $@
2006-11-18 02:41:20 +03:00
2012-03-21 07:45:56 +04:00
LIB_FLAGS = @LDFLAGS@ -Llib @LIBS@ $( POPT_LIBS) $( TALLOC_LIBS) $( TEVENT_LIBS) $( TDB_LIBS) \
@INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@
2006-11-18 02:41:20 +03:00
2007-06-07 16:30:29 +04:00
UTIL_OBJ = lib/util/idtree.o lib/util/db_wrap.o lib/util/strlist.o lib/util/util.o \
2009-12-18 14:32:38 +03:00
lib/util/util_time.o lib/util/util_file.o lib/util/fault.o lib/util/substitute.o \
lib/util/signal.o
2006-11-18 02:41:20 +03:00
2007-06-07 16:30:29 +04:00
CTDB_COMMON_OBJ = common/ctdb_io.o common/ctdb_util.o \
2007-06-07 16:06:19 +04:00
common/ctdb_ltdb.o common/ctdb_message.o common/cmdline.o \
2009-11-18 04:44:18 +03:00
lib/util/debug.o common/rb_tree.o @CTDB_SYSTEM_OBJ@ common/system_common.o \
2012-05-03 05:42:41 +04:00
common/ctdb_logging.c common/ctdb_fork.o
2010-05-20 10:27:40 +04:00
CTDB_LIB_OBJ = libctdb/ctdb.o libctdb/io_elem.o libctdb/local_tdb.o \
2010-06-04 14:57:03 +04:00
libctdb/messages.o libctdb/sync.o libctdb/control.o \
2011-10-20 16:17:45 +04:00
libctdb/logging.o $( SOCKET_WRAPPER_OBJ)
2007-05-25 11:04:13 +04:00
2006-11-28 03:51:33 +03:00
CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
2006-11-27 13:38:13 +03:00
2007-06-07 16:06:19 +04:00
CTDB_CLIENT_OBJ = client/ctdb_client.o \
2012-03-21 07:45:56 +04:00
$( CTDB_COMMON_OBJ) $( POPT_OBJ) $( UTIL_OBJ) $( TALLOC_OBJ) $( TDB_OBJ) \
2012-03-21 08:56:45 +04:00
@LIBREPLACEOBJ@ $( EXTRA_OBJ) $( TEVENT_OBJ) $( SOCKET_WRAPPER_OBJ)
2007-06-07 16:06:19 +04:00
2012-06-14 10:12:48 +04:00
CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o \
2007-06-07 16:16:48 +04:00
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 \
2007-07-04 10:51:13 +04:00
server/ctdb_traverse.o server/eventscript.o server/ctdb_takeover.o \
2007-09-21 06:24:02 +04:00
server/ctdb_serverids.o server/ctdb_persistent.o \
2009-07-28 18:45:31 +04:00
server/ctdb_keepalive.o server/ctdb_logging.o server/ctdb_uptime.o \
2010-09-29 06:13:05 +04:00
server/ctdb_vacuum.o server/ctdb_banning.o server/ctdb_statistics.o \
2012-10-11 04:29:29 +04:00
server/ctdb_update_record.o server/ctdb_lock.o \
2007-07-04 10:52:38 +04:00
$( CTDB_CLIENT_OBJ) $( CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
2006-11-18 02:41:20 +03:00
2009-12-15 04:14:49 +03:00
TEST_BINS = tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_fetch_one \
2011-07-20 09:47:15 +04:00
tests/bin/ctdb_fetch_lock_once \
tests/bin/ctdb_fetch_readonly_once tests/bin/ctdb_fetch_readonly_loop \
2011-07-20 05:50:14 +04:00
tests/bin/ctdb_store tests/bin/ctdb_trackingdb_test \
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_randrec tests/bin/ctdb_persistent \
tests/bin/ctdb_traverse tests/bin/rb_test tests/bin/ctdb_transaction \
2011-07-20 06:13:53 +04:00
tests/bin/ctdb_takeover_tests tests/bin/ctdb_update_record \
2012-03-12 09:09:32 +04:00
tests/bin/ctdb_update_record_persistent \
2011-12-15 04:26:57 +04:00
tests/bin/ctdb_tool_libctdb tests/bin/ctdb_tool_stubby \
2007-08-08 05:21:18 +04:00
@INFINIBAND_BINS@
2011-07-13 20:11:23 +04:00
BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong bin/ltdbtool @CTDB_PMDA@
2007-05-29 09:52:03 +04:00
SBINS = bin/ctdbd
2006-11-18 02:41:20 +03:00
2009-01-09 10:15:06 +03:00
DIRS = lib bin tests/bin
2006-11-18 02:41:20 +03:00
2007-06-12 07:44:01 +04:00
.SUFFIXES : .c .o .h .1 .1.xml .1.html
2010-05-26 02:56:46 +04:00
all : showflags dirs doc $( CTDB_SERVER_OBJ ) $( CTDB_CLIENT_OBJ ) $( CTDB_LIB_OBJ ) $( BINS ) $( SBINS ) $( TEST_BINS )
2006-11-18 02:41:20 +03:00
showflags :
@echo 'ctdb will be compiled with flags:'
@echo ' CFLAGS = $(CFLAGS)'
2012-03-21 09:08:57 +04:00
@echo ' LIBS = $(LIB_FLAGS)'
2006-11-18 02:41:20 +03:00
2009-02-04 02:22:01 +03:00
showlayout ::
@echo "ctdb will be installed into:"
@echo " prefix: $( prefix) "
@echo " bindir: $( bindir) "
@echo " sbindir: $( sbindir) "
@echo " libdir: $( libdir) "
@echo " vardir: $( localstatedir) "
@echo " logdir: $( logdir) "
@echo " mandir: $( mandir) "
@echo " etcdir: $( etcdir) "
2006-11-18 02:41:20 +03:00
.c.o :
@echo Compiling $* .c
@mkdir -p ` dirname $@ `
@$( CC) $( CFLAGS) -c $< -o $@
dirs :
@mkdir -p $( DIRS)
2007-06-07 16:06:19 +04:00
bin/ctdbd : $( CTDB_SERVER_OBJ )
2007-04-11 12:54:22 +04:00
@echo Linking $@
2007-06-07 16:06:19 +04:00
@$( CC) $( CFLAGS) -o $@ $( CTDB_SERVER_OBJ) $( LIB_FLAGS)
2007-04-11 12:54:22 +04:00
2010-05-20 10:27:40 +04:00
libctdb/libctdb.a : $( CTDB_LIB_OBJ )
@echo Linking $@
-rm -f libctdb.a
@$( AR) $( ARFLAGS) libctdb/libctdb.a $( CTDB_LIB_OBJ)
@$( RANLIB) libctdb/libctdb.a
2011-09-03 03:30:08 +04:00
libctdb/libctdb.so.0 : $( CTDB_LIB_OBJ )
@echo Linking $@
@$( SHLD) -Wl,-soname= libctdb.so.0 $( CTDB_LIB_OBJ)
libctdb/libctdb.so : libctdb /libctdb .so .0
@echo Creating $@
-@rm -f libctdb/libctdb.so
@ln -s libctdb.so.0 libctdb/libctdb.so
2007-08-07 03:03:51 +04:00
bin/scsi_io : $( CTDB_CLIENT_OBJ ) utils /scsi_io /scsi_io .o
2007-07-02 10:13:31 +04:00
@echo Linking $@
2007-08-07 03:03:51 +04:00
@$( CC) $( CFLAGS) -o $@ utils/scsi_io/scsi_io.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2007-07-02 10:13:31 +04:00
2010-06-02 04:37:00 +04:00
bin/ctdb : $( CTDB_CLIENT_OBJ ) tools /ctdb .o tools /ctdb_vacuum .o libctdb /libctdb .a
2007-04-26 16:27:49 +04:00
@echo Linking $@
2010-06-02 04:37:00 +04:00
@$( CC) $( CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS) libctdb/libctdb.a
2007-04-26 16:27:49 +04:00
2012-03-21 07:45:56 +04:00
bin/ltdbtool : tools /ltdbtool .o $( TDB_OBJ )
2011-04-14 14:51:59 +04:00
@echo Linking $@
2012-03-21 07:45:56 +04:00
@$( CC) $( CFLAGS) -o $@ $+ $( TDB_LIBS)
2011-04-14 14:51:59 +04:00
2009-05-20 10:59:00 +04:00
bin/smnotify : utils /smnotify /gen_xdr .o utils /smnotify /gen_smnotify .o utils /smnotify /smnotify .o $( POPT_OBJ )
2007-08-03 04:18:48 +04:00
@echo Linking $@
2007-08-15 01:59:01 +04:00
@$( CC) $( CFLAGS) -o $@ utils/smnotify/smnotify.o utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o $( POPT_OBJ) $( LIB_FLAGS)
2007-08-03 04:18:48 +04:00
2009-02-25 01:13:16 +03:00
utils/smnotify/smnotify.o : utils /smnotify /smnotify .c utils /smnotify /smnotify .h
2007-08-03 04:18:48 +04:00
utils/smnotify/smnotify.h : utils /smnotify /smnotify .x
@echo Generating $@
2007-08-15 01:59:01 +04:00
rpcgen -h utils/smnotify/smnotify.x > utils/smnotify/smnotify.h
2007-08-03 04:18:48 +04:00
utils/smnotify/gen_xdr.c : utils /smnotify /smnotify .x utils /smnotify /smnotify .h
@echo Generating $@
2011-11-10 08:12:25 +04:00
rpcgen -c utils/smnotify/smnotify.x | grep -Ev '^[[:space:]]+register int32_t \*buf;' > utils/smnotify/gen_xdr.c
2007-08-03 04:18:48 +04:00
utils/smnotify/gen_smnotify.c : utils /smnotify /smnotify .x utils /smnotify /smnotify .h
@echo Generating $@
2007-08-15 01:59:01 +04:00
rpcgen -l utils/smnotify/smnotify.x > utils/smnotify/gen_smnotify.c
2007-08-03 04:18:48 +04:00
2009-04-29 19:57:43 +04:00
bin/ping_pong : utils /ping_pong /ping_pong .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ utils/ping_pong/ping_pong.o
2011-07-13 20:11:23 +04:00
bin/pmdactdb : $( CTDB_CLIENT_OBJ ) utils /pmda /pmda_ctdb .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ utils/pmda/pmda_ctdb.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS) $( PMDA_LIBS)
2009-04-29 19:57:43 +04:00
2009-01-09 10:15:06 +03:00
tests/bin/rb_test : $( CTDB_CLIENT_OBJ ) tests /src /rb_test .o
2007-08-08 05:21:18 +04:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/rb_test.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2007-08-08 05:21:18 +04:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_bench : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_bench .o
2006-12-19 08:27:03 +03:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_bench.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2006-12-19 08:27:03 +03:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_fetch : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_fetch .o
2007-04-05 07:18:31 +04:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_fetch.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2007-04-05 07:18:31 +04:00
2009-12-15 04:14:49 +03:00
tests/bin/ctdb_fetch_one : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_fetch_one .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_fetch_one.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2011-08-23 09:13:40 +04:00
tests/bin/ctdb_fetch_lock_once : libctdb /libctdb .a tests /src /ctdb_fetch_lock_once .o
2011-01-23 23:39:33 +03:00
@echo Linking $@
2012-03-30 05:06:05 +04:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_fetch_lock_once.o $( TDB_OBJ) $( POPT_OBJ) libctdb/libctdb.a $( LIB_FLAGS)
2011-01-23 23:39:33 +03:00
2011-10-28 08:50:44 +04:00
tests/bin/ctdb_fetch_readonly_once : libctdb /libctdb .a tests /src /ctdb_fetch_readonly_once .o
2011-07-20 09:43:55 +04:00
@echo Linking $@
2012-03-30 05:06:05 +04:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_fetch_readonly_once.o $( TDB_OBJ) $( POPT_OBJ) libctdb/libctdb.a $( LIB_FLAGS)
2011-07-20 09:43:55 +04:00
2011-07-20 09:47:15 +04:00
tests/bin/ctdb_fetch_readonly_loop : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_fetch_readonly_loop .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_fetch_readonly_loop.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2011-07-20 05:50:14 +04:00
tests/bin/ctdb_trackingdb_test : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_trackingdb_test .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_trackingdb_test.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2011-07-20 06:13:53 +04:00
tests/bin/ctdb_update_record : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_update_record .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_update_record.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2012-03-12 09:09:32 +04:00
tests/bin/ctdb_update_record_persistent : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_update_record_persistent .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_update_record_persistent.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_store : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_store .o
2007-06-17 05:13:42 +04:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_store.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2007-06-17 05:13:42 +04:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_traverse : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_traverse .o
2008-01-29 03:39:06 +03:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_traverse.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2008-01-29 03:39:06 +03:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_randrec : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_randrec .o
2008-01-04 01:19:06 +03:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_randrec.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2008-01-04 01:19:06 +03:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_persistent : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_persistent .o
2007-09-21 06:24:02 +04:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_persistent.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2007-09-21 06:24:02 +04:00
2009-01-09 10:15:06 +03:00
tests/bin/ctdb_transaction : $( CTDB_CLIENT_OBJ ) tests /src /ctdb_transaction .o
2008-07-30 13:55:54 +04:00
@echo Linking $@
2008-11-21 11:01:48 +03:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_transaction.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2008-07-30 13:55:54 +04:00
2011-11-11 07:15:52 +04:00
CTDB_SERVER_MOST_OBJ = $( CTDB_SERVER_OBJ:server/ctdbd.o= )
2011-12-07 07:04:54 +04:00
CTDBD_TEST_C = $( CTDB_SERVER_MOST_OBJ:.o= .c) tests/src/ctdbd_test.c
CTDB_TEST_C = $( CTDB_CLIENT_OBJ:.o= .c) tools/ctdb.c tools/ctdb_vacuum.c tests/src/ctdb_test.c
2012-03-21 07:45:56 +04:00
CTDB_TEST_OBJ = $( TALLOC_OBJ) $( TDB_OBJ) \
2012-03-21 08:56:45 +04:00
@CTDB_SYSTEM_OBJ@ @LIBREPLACEOBJ@ $( EXTRA_OBJ) $( TEVENT_OBJ) $( SOCKET_WRAPPER_OBJ)
2011-11-11 07:15:52 +04:00
2011-12-07 07:04:54 +04:00
tests/src/ctdb_takeover_tests.o : tests /src /ctdb_takeover_tests .c $( CTDBD_TEST_C )
2011-07-28 09:22:42 +04:00
2011-11-11 07:15:52 +04:00
tests/bin/ctdb_takeover_tests : $( CTDB_TEST_OBJ ) tests /src /ctdb_takeover_tests .o
2011-07-28 09:22:42 +04:00
@echo Linking $@
2011-11-11 07:15:52 +04:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_takeover_tests.o $( CTDB_TEST_OBJ) $( LIB_FLAGS)
2011-07-28 09:22:42 +04:00
2011-12-07 07:04:54 +04:00
tests/src/ctdb_tool_libctdb.o : tests /src /ctdb_tool_libctdb .c tests /src /libctdb_test .c $( CTDB_TEST_C )
2011-12-07 07:04:54 +04:00
2011-12-07 07:04:54 +04:00
tests/bin/ctdb_tool_libctdb : $( CTDB_TEST_OBJ ) tests /src /ctdb_tool_libctdb .o
2011-12-07 07:04:54 +04:00
@echo Linking $@
2012-03-30 05:06:05 +04:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_tool_libctdb.o $( CTDB_TEST_OBJ) $( POPT_OBJ) $( LIB_FLAGS)
2011-12-07 07:04:54 +04:00
2011-12-15 04:26:57 +04:00
tests/src/ctdb_tool_stubby.o : tests /src /ctdb_tool_stubby .c tests /src /libctdb_test .c $( CTDB_TEST_C )
tests/bin/ctdb_tool_stubby : $( CTDB_TEST_OBJ ) tests /src /ctdb_tool_stubby .o
@echo Linking $@
2012-03-30 05:06:05 +04:00
@$( CC) $( CFLAGS) -o $@ tests/src/ctdb_tool_stubby.o $( CTDB_TEST_OBJ) $( POPT_OBJ) $( LIB_FLAGS)
2011-12-15 04:26:57 +04:00
2009-01-09 10:15:06 +03:00
tests/bin/ibwrapper_test : $( CTDB_CLIENT_OBJ ) ib /ibwrapper_test .o
2006-12-15 18:02:45 +03:00
@echo Linking $@
2007-06-07 16:06:19 +04:00
@$( CC) $( CFLAGS) -o $@ ib/ibwrapper_test.o $( CTDB_CLIENT_OBJ) $( LIB_FLAGS)
2006-12-15 18:02:45 +03:00
2007-06-12 07:44:01 +04:00
.1.xml.1 :
-test -z " $( XSLTPROC) " || $( XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
2007-06-09 02:41:36 +04:00
2007-06-12 07:44:01 +04:00
.1.xml.1.html :
-test -z " $( XSLTPROC) " || $( XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
2007-06-10 04:45:52 +04:00
2007-06-12 07:44:01 +04:00
doc : doc /ctdb .1 doc /ctdb .1.html \
doc/ctdbd.1 doc/ctdbd.1.html \
2011-05-04 16:14:54 +04:00
doc/onnode.1 doc/onnode.1.html \
2011-03-26 13:55:30 +03:00
doc/ltdbtool.1 doc/ltdbtool.1.html \
doc/ping_pong.1 doc/ping_pong.1.html
2007-06-10 04:45:52 +04:00
2006-11-18 02:41:20 +03:00
clean :
2010-05-20 10:27:40 +04:00
rm -f *.o */*.o */*.a */*/*.o */*~
2007-08-22 11:16:01 +04:00
rm -f utils/smnotify/gen_xdr.c
2007-06-02 07:16:11 +04:00
rm -f $( BINS) $( SBINS) $( TEST_BINS)
2006-11-18 02:41:20 +03:00
distclean : clean
rm -f *~ */*~
2006-12-15 18:02:45 +03:00
rm -rf bin
2006-12-18 17:58:29 +03:00
rm -f config.log config.status config.cache config.h
2006-11-18 02:41:20 +03:00
rm -f Makefile
2011-07-13 20:11:23 +04:00
install : all $( PMDA_INSTALL )
2009-04-08 03:21:11 +04:00
mkdir -p $( DESTDIR) $( libdir) /pkgconfig
2007-05-28 00:48:18 +04:00
mkdir -p $( DESTDIR) $( bindir)
2007-06-01 17:25:33 +04:00
mkdir -p $( DESTDIR) $( sbindir)
2007-05-28 00:48:18 +04:00
mkdir -p $( DESTDIR) $( includedir)
2007-06-01 15:10:49 +04:00
mkdir -p $( DESTDIR) $( etcdir) /ctdb
mkdir -p $( DESTDIR) $( etcdir) /ctdb/events.d
2008-07-09 05:08:44 +04:00
mkdir -p $( DESTDIR) $( docdir) /ctdb
2009-04-08 03:21:11 +04:00
${ INSTALLCMD } -m 644 ctdb.pc $( DESTDIR) $( libdir) /pkgconfig
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 755 bin/ctdb $( DESTDIR) $( bindir)
${ INSTALLCMD } -m 755 bin/ctdbd $( DESTDIR) $( sbindir)
2007-08-04 04:15:07 +04:00
${ INSTALLCMD } -m 755 bin/smnotify $( DESTDIR) $( bindir)
2009-04-29 19:57:43 +04:00
$( INSTALLCMD) -m 755 bin/ping_pong $( DESTDIR) $( bindir)
2011-05-04 15:44:59 +04:00
$( INSTALLCMD) -m 755 bin/ltdbtool $( DESTDIR) $( bindir)
2010-05-26 03:01:26 +04:00
$( INSTALLCMD) -m 755 libctdb/libctdb.a $( DESTDIR) $( libdir)
2010-05-20 10:27:40 +04:00
${ INSTALLCMD } -m 644 include/ctdb.h $( DESTDIR) $( includedir)
2010-05-20 09:48:30 +04:00
${ INSTALLCMD } -m 644 include/ctdb_client.h $( DESTDIR) $( includedir)
${ INSTALLCMD } -m 644 include/ctdb_protocol.h $( DESTDIR) $( includedir)
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 644 include/ctdb_private.h $( DESTDIR) $( includedir) # for samba3
2010-06-02 03:18:48 +04:00
${ INSTALLCMD } -m 644 include/ctdb_typesafe_cb.h $( DESTDIR) $( includedir)
2008-07-09 04:24:19 +04:00
${ INSTALLCMD } -m 644 config/functions $( DESTDIR) $( etcdir) /ctdb
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 755 config/statd-callout $( DESTDIR) $( etcdir) /ctdb
2009-01-19 11:42:48 +03:00
${ INSTALLCMD } -m 644 config/events.d/README $( DESTDIR) $( docdir) /ctdb/README.eventscripts
${ INSTALLCMD } -m 644 doc/recovery-process.txt $( DESTDIR) $( docdir) /ctdb/recovery-process.txt
2007-08-15 09:01:31 +04:00
${ INSTALLCMD } -m 755 config/events.d/00.ctdb $( DESTDIR) $( etcdir) /ctdb/events.d
2009-09-28 08:06:40 +04:00
${ INSTALLCMD } -m 755 config/events.d/01.reclock $( DESTDIR) $( etcdir) /ctdb/events.d
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 755 config/events.d/10.interface $( DESTDIR) $( etcdir) /ctdb/events.d
2009-03-31 13:00:00 +04:00
${ INSTALLCMD } -m 755 config/events.d/11.natgw $( DESTDIR) $( etcdir) /ctdb/events.d
2009-06-23 05:29:26 +04:00
${ INSTALLCMD } -m 755 config/events.d/11.routing $( DESTDIR) $( etcdir) /ctdb/events.d
2009-12-19 20:26:01 +03:00
${ INSTALLCMD } -m 755 config/events.d/13.per_ip_routing $( DESTDIR) $( etcdir) /ctdb/events.d
2009-10-26 02:22:00 +03:00
${ INSTALLCMD } -m 644 config/events.d/20.multipathd $( DESTDIR) $( etcdir) /ctdb/events.d
2009-05-25 06:02:36 +04:00
${ INSTALLCMD } -m 644 config/events.d/31.clamd $( DESTDIR) $( etcdir) /ctdb/events.d
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 755 config/events.d/40.vsftpd $( DESTDIR) $( etcdir) /ctdb/events.d
2011-08-11 04:00:53 +04:00
${ INSTALLCMD } -m 644 config/events.d/40.fs_use $( DESTDIR) $( etcdir) /ctdb/events.d
2008-01-11 02:44:16 +03:00
${ INSTALLCMD } -m 755 config/events.d/41.httpd $( DESTDIR) $( etcdir) /ctdb/events.d
2012-08-16 08:41:11 +04:00
${ INSTALLCMD } -m 755 config/events.d/49.winbind $( DESTDIR) $( etcdir) /ctdb/events.d
2007-06-26 01:40:37 +04:00
${ INSTALLCMD } -m 755 config/events.d/50.samba $( DESTDIR) $( etcdir) /ctdb/events.d
${ INSTALLCMD } -m 755 config/events.d/60.nfs $( DESTDIR) $( etcdir) /ctdb/events.d
2012-05-17 05:16:57 +04:00
${ INSTALLCMD } -m 755 config/events.d/60.ganesha $( DESTDIR) $( etcdir) /ctdb/events.d
2010-05-04 07:56:55 +04:00
${ INSTALLCMD } -m 755 config/events.d/62.cnfs $( DESTDIR) $( etcdir) /ctdb/events.d
2008-02-06 06:00:04 +03:00
${ INSTALLCMD } -m 755 config/events.d/70.iscsi $( DESTDIR) $( etcdir) /ctdb/events.d
2008-01-09 00:50:03 +03:00
${ INSTALLCMD } -m 755 config/events.d/91.lvs $( DESTDIR) $( etcdir) /ctdb/events.d
2007-09-05 08:20:34 +04:00
${ INSTALLCMD } -m 755 tools/ctdb_diagnostics $( DESTDIR) $( bindir)
2008-07-09 08:23:02 +04:00
${ INSTALLCMD } -m 755 tools/onnode $( DESTDIR) $( bindir)
2007-06-09 09:21:30 +04:00
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
2007-06-10 04:45:52 +04:00
if [ -f doc/ctdbd.1 ] ; then ${ INSTALLCMD } -m 644 doc/ctdbd.1 $( DESTDIR) $( mandir) /man1; fi
2007-06-12 07:44:01 +04:00
if [ -f doc/onnode.1 ] ; then ${ INSTALLCMD } -m 644 doc/onnode.1 $( DESTDIR) $( mandir) /man1; fi
2011-05-04 16:25:48 +04:00
if [ -f doc/ltdbtool.1 ] ; then ${ INSTALLCMD } -m 644 doc/ltdbtool.1 $( DESTDIR) $( mandir) /man1; fi
2011-03-26 13:55:30 +03:00
if [ -f doc/ping_pong.1 ] ; then ${ INSTALLCMD } -m 644 doc/ping_pong.1 $( DESTDIR) $( mandir) /man1; fi
2009-04-08 02:48:55 +04:00
if [ ! -f $( DESTDIR) $( etcdir) /ctdb/notify.sh ] ; then ${ INSTALLCMD } -m 755 config/notify.sh $( DESTDIR) $( etcdir) /ctdb; fi
2012-05-17 04:17:51 +04:00
${ INSTALLCMD } -m 755 config/debug-hung-script.sh $( DESTDIR) $( etcdir) /ctdb
2010-04-22 08:02:11 +04:00
if [ ! -f $( DESTDIR) $( etcdir) /ctdb/ctdb-crash-cleanup.sh ] ; then ${ INSTALLCMD } -m 755 config/ctdb-crash-cleanup.sh $( DESTDIR) $( etcdir) /ctdb; fi
2012-09-06 14:22:38 +04:00
if [ ! -f $( DESTDIR) $( etcdir) /ctdb/gcore_trace.sh ] ; then ${ INSTALLCMD } -m 755 config/gcore_trace.sh $( DESTDIR) $( etcdir) /ctdb; fi
2007-04-27 19:24:10 +04:00
2011-07-13 20:11:23 +04:00
install_pmda :
$( INSTALLCMD) -m 755 -d $( PMDA_DEST_DIR)
$( INSTALLCMD) -m 755 pmda/Install pmda/Remove $( PMDA_DEST_DIR)
$( INSTALLCMD) -m 644 pmda/pmns pmda/domain.h pmda/help pmda/README $( PMDA_DEST_DIR)
$( INSTALLCMD) -m 755 bin/pmdactdb $( PMDA_DEST_DIR)
2012-04-24 10:28:15 +04:00
# Should use $(datarootdir) but older autoconfs don't do this. :-(
install_tests : all
tests/INSTALL --destdir= $( DESTDIR) --datarootdir= $( prefix) /share --libdir= $( libdir) --bindir= $( bindir) --etcdir= $( etcdir)
2007-05-01 00:34:55 +04:00
test : all
2012-05-14 06:47:02 +04:00
tests/run_tests.sh -V tests/var
2007-04-28 12:57:58 +04:00
2012-03-21 04:51:56 +04:00
test_cluster : all
tests/run_cluster_tests.sh
2007-05-01 00:34:55 +04:00
valgrindtest : all
2007-04-28 12:57:58 +04:00
VALGRIND = "valgrind -q --trace-children=yes" tests/run_tests.sh
2012-01-11 12:04:39 +04:00
ctags :
find . -name "*.[ch]" | xargs ctags
etags :
find . -name "*.[ch]" | xargs etags
2007-04-27 19:24:10 +04:00
2006-11-18 02:41:20 +03:00
realdistclean : distclean
2009-04-08 03:21:11 +04:00
rm -f configure config.h.in ctdb.pc