add a sync wrapper for the getpnn control
[metze/ctdb/wip.git] / Makefile.in
index ad34f68c74970ab2f67f18e8bb2e4533be71afa1..b72e90eecc755f2fde890911dce0ebfad6d33b55 100755 (executable)
@@ -2,6 +2,9 @@
 
 
 CC = @CC@
+AR = ar
+ARFLAGS = cru
+RANLIB = ranlib
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 datarootdir = @datarootdir@
@@ -43,6 +46,9 @@ CTDB_COMMON_OBJ =  common/ctdb_io.o common/ctdb_util.o \
        lib/util/debug.o common/rb_tree.o @CTDB_SYSTEM_OBJ@ common/system_common.o \
        common/ctdb_logging.c
 
+CTDB_LIB_OBJ = libctdb/ctdb.o libctdb/io_elem.o libctdb/local_tdb.o \
+       libctdb/messages.o libctdb/sync.o libctdb/control.o
+
 CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
 
 CTDB_CLIENT_OBJ = client/ctdb_client.o \
@@ -72,7 +78,7 @@ DIRS = lib bin tests/bin
 
 .SUFFIXES: .c .o .h .1 .1.xml .1.html
 
-all: showflags dirs doc $(CTDB_SERVER_OBJ) $(CTDB_CLIENT_OBJ) $(BINS) $(SBINS) $(TEST_BINS)
+all: showflags dirs doc $(CTDB_SERVER_OBJ) $(CTDB_CLIENT_OBJ) $(CTDB_LIB_OBJ) $(BINS) $(SBINS) $(TEST_BINS)
 
 showflags:
        @echo 'ctdb will be compiled with flags:'
@@ -102,6 +108,12 @@ bin/ctdbd: $(CTDB_SERVER_OBJ)
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ $(CTDB_SERVER_OBJ) $(LIB_FLAGS)
 
+libctdb/libctdb.a: $(CTDB_LIB_OBJ)
+       @echo Linking $@
+       -rm -f libctdb.a
+       @$(AR) $(ARFLAGS) libctdb/libctdb.a $(CTDB_LIB_OBJ)
+       @$(RANLIB) libctdb/libctdb.a
+
 bin/scsi_io: $(CTDB_CLIENT_OBJ) utils/scsi_io/scsi_io.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ utils/scsi_io/scsi_io.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
@@ -184,7 +196,7 @@ doc: doc/ctdb.1 doc/ctdb.1.html \
        doc/onnode.1 doc/onnode.1.html
 
 clean:
-       rm -f *.o */*.o */*/*.o */*~
+       rm -f *.o */*.o */*.a */*/*.o */*~
        rm -f utils/smnotify/gen_xdr.c
        rm -f $(BINS) $(SBINS) $(TEST_BINS)
 
@@ -207,8 +219,12 @@ install: all
        ${INSTALLCMD} -m 755 bin/ctdbd $(DESTDIR)$(sbindir)
        ${INSTALLCMD} -m 755 bin/smnotify $(DESTDIR)$(bindir)
        $(INSTALLCMD) -m 755 bin/ping_pong $(DESTDIR)$(bindir)
+       $(INSTALLCMD) -m 755 libctdb/libctdb.a $(DESTDIR)$(libdir)
        ${INSTALLCMD} -m 644 include/ctdb.h $(DESTDIR)$(includedir)
+       ${INSTALLCMD} -m 644 include/ctdb_client.h $(DESTDIR)$(includedir)
+       ${INSTALLCMD} -m 644 include/ctdb_protocol.h $(DESTDIR)$(includedir)
        ${INSTALLCMD} -m 644 include/ctdb_private.h $(DESTDIR)$(includedir) # for samba3
+       ${INSTALLCMD} -m 644 include/ctdb_typesafe_cb.h $(DESTDIR)$(includedir)
        ${INSTALLCMD} -m 644 config/functions $(DESTDIR)$(etcdir)/ctdb
        ${INSTALLCMD} -m 755 config/statd-callout $(DESTDIR)$(etcdir)/ctdb
        ${INSTALLCMD} -m 755 config/interface_modify.sh $(DESTDIR)$(etcdir)/ctdb
@@ -227,6 +243,7 @@ install: all
        ${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
        ${INSTALLCMD} -m 755 config/events.d/61.nfstickle $(DESTDIR)$(etcdir)/ctdb/events.d
+       ${INSTALLCMD} -m 755 config/events.d/62.cnfs $(DESTDIR)$(etcdir)/ctdb/events.d
        ${INSTALLCMD} -m 755 config/events.d/70.iscsi $(DESTDIR)$(etcdir)/ctdb/events.d
        ${INSTALLCMD} -m 755 config/events.d/91.lvs $(DESTDIR)$(etcdir)/ctdb/events.d
        ${INSTALLCMD} -m 755 tools/ctdb_diagnostics $(DESTDIR)$(bindir)
@@ -236,6 +253,7 @@ install: all
        if [ -f doc/ctdbd.1 ];then ${INSTALLCMD} -m 644 doc/ctdbd.1 $(DESTDIR)$(mandir)/man1; fi
        if [ -f doc/onnode.1 ];then ${INSTALLCMD} -m 644 doc/onnode.1 $(DESTDIR)$(mandir)/man1; fi
        if [ ! -f $(DESTDIR)$(etcdir)/ctdb/notify.sh ];then ${INSTALLCMD} -m 755 config/notify.sh $(DESTDIR)$(etcdir)/ctdb; fi
+       if [ ! -f $(DESTDIR)$(etcdir)/ctdb/ctdb-crash-cleanup.sh ];then ${INSTALLCMD} -m 755 config/ctdb-crash-cleanup.sh $(DESTDIR)$(etcdir)/ctdb; fi
 
 test: all
        tests/run_tests.sh