1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/ctdb/Makefile.in
Andrew Tridgell 794d6dd59d move config files to config/ directory
(This used to be ctdb commit f95de519b885c8e1f40df0cda70fd796e479a22a)
2007-06-02 19:40:07 +10:00

130 lines
3.9 KiB
Makefile

#!gmake
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
sbindir = @sbindir@
localstatedir = @localstatedir@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@
etcdir = @sysconfdir@
builddir = @builddir@
DESTDIR = /
EXTRA_OBJ=@EXTRA_OBJ@
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
CTDB_COMMON_OBJ = common/ctdb.o common/ctdb_daemon.o common/ctdb_client.o \
common/ctdb_io.o common/util.o common/ctdb_util.o \
common/ctdb_call.o common/ctdb_ltdb.o common/ctdb_lockwait.o \
common/ctdb_message.o common/cmdline.o common/ctdb_control.o \
lib/util/debug.o common/ctdb_recover.o common/ctdb_recoverd.o \
common/ctdb_freeze.o common/ctdb_traverse.o common/ctdb_monitor.o
CTDB_TAKEOVER_OBJ = takeover/system.o takeover/ctdb_takeover.o
CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
CTDB_OBJ = $(CTDB_COMMON_OBJ) $(CTDB_TAKEOVER_OBJ) $(CTDB_TCP_OBJ) $(POPT_OBJ)
OBJS = @TDB_OBJ@ @TALLOC_OBJ@ @LIBREPLACEOBJ@ @INFINIBAND_WRAPPER_OBJ@ $(EXTRA_OBJ) @EVENTS_OBJ@ $(CTDB_OBJ) $(UTIL_OBJ)
TEST_BINS=bin/ctdbd_test bin/ctdb_bench bin/ctdb_fetch @INFINIBAND_BINS@
BINS = bin/ctdb
SBINS = bin/ctdbd
DIRS = lib bin
all: showflags dirs $(OBJS) $(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: $(OBJS) direct/ctdbd.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ direct/ctdbd.o $(OBJS) $(LIB_FLAGS)
bin/ctdb: $(OBJS) tools/ctdb_control.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tools/ctdb_control.o $(OBJS) $(LIB_FLAGS)
bin/ctdbd_test: $(OBJS) direct/ctdbd_test.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ direct/ctdbd_test.o
bin/ctdb_bench: $(OBJS) tests/ctdb_bench.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/ctdb_bench.o $(OBJS) $(LIB_FLAGS)
bin/ctdb_fetch: $(OBJS) tests/ctdb_fetch.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tests/ctdb_fetch.o $(OBJS) $(LIB_FLAGS)
bin/ibwrapper_test: $(OBJS) ib/ibwrapper_test.o
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(OBJS) $(LIB_FLAGS)
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
install -m755 bin/ctdb $(DESTDIR)$(bindir)
install -m755 bin/ctdbd $(DESTDIR)$(sbindir)
install -m644 include/ctdb.h $(DESTDIR)$(includedir)
install -m644 include/ctdb_private.h $(DESTDIR)$(includedir) # for samba3
install -m755 config/events $(DESTDIR)$(etcdir)/ctdb
install -m755 config/functions $(DESTDIR)$(etcdir)/ctdb
install -m755 config/statd-callout $(DESTDIR)$(etcdir)/ctdb
install -m755 config/events.d/samba $(DESTDIR)$(etcdir)/ctdb/events.d
install -m755 config/events.d/nfs $(DESTDIR)$(etcdir)/ctdb/events.d
install -m755 config/events.d/nfslock $(DESTDIR)$(etcdir)/ctdb/events.d
install -m755 tools/onnode.ssh $(DESTDIR)$(bindir)
install -m755 tools/onnode.rsh $(DESTDIR)$(bindir)
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