2006-11-18 02:41:20 +03:00
#!gmake
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
EXTRA_OBJ = @EXTRA_OBJ@
2007-01-25 07:10:40 +03:00
CFLAGS = -g -I$( srcdir) /include -Iinclude -Ilib/util -I$( srcdir) \
2006-11-18 02:41:20 +03:00
-I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
-DLIBDIR= \" $( libdir) \" -DSHLIBEXT= \" @SHLIBEXT@\" -DUSE_MMAP= 1 @CFLAGS@
2006-12-15 18:02:45 +03:00
LIB_FLAGS = @LDFLAGS@ -Llib @LIBS@ -lpopt @INFINIBAND_LIBS@
2006-11-18 02:41:20 +03:00
2006-11-28 12:48:34 +03:00
EVENTS_OBJ = lib/events/events.o lib/events/events_standard.o
2006-11-18 02:41:20 +03:00
2006-11-28 09:56:10 +03:00
CTDB_COMMON_OBJ = common/ctdb.o common/util.o common/ctdb_util.o \
2007-02-09 01:42:04 +03:00
common/ctdb_call.o common/ctdb_ltdb.o common/ctdb_message.o \
lib/util/idtree.o lib/util/db_wrap.o
2006-11-27 13:38:13 +03: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
CTDB_OBJ = $( CTDB_COMMON_OBJ) $( CTDB_TCP_OBJ)
2006-11-18 02:41:20 +03:00
2006-12-15 18:02:45 +03:00
OBJS = @TDBOBJ@ @TALLOCOBJ@ @LIBREPLACEOBJ@ @INFINIBAND_WRAPPER_OBJ@ $( EXTRA_OBJ) $( EVENTS_OBJ) $( CTDB_OBJ)
2006-11-18 02:41:20 +03:00
2006-12-19 08:27:03 +03:00
BINS = bin/ctdb_test bin/ctdb_bench @INFINIBAND_BINS@
2006-11-18 02:41:20 +03:00
DIRS = lib bin
all : showflags dirs $( OBJS ) $( 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/ctdb_test : $( OBJS ) ctdb_test .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ ctdb_test.o $( OBJS) $( LIB_FLAGS)
2006-12-19 08:27:03 +03:00
bin/ctdb_bench : $( OBJS ) ctdb_bench .o
@echo Linking $@
@$( CC) $( CFLAGS) -o $@ ctdb_bench.o $( OBJS) $( LIB_FLAGS)
2007-02-12 18:47:12 +03:00
bin/ibwrapper_test : $( OBJS ) ib /ibwrapper_test .o
2006-12-15 18:02:45 +03:00
@echo Linking $@
2007-02-12 18:47:12 +03:00
@$( CC) $( CFLAGS) -o $@ ib/ibwrapper_test.o $( OBJS) $( LIB_FLAGS)
2006-12-15 18:02:45 +03:00
2006-11-18 02:41:20 +03:00
clean :
2006-12-15 18:02:45 +03:00
rm -f *.o */*.o */*/*.o
2006-11-18 02:41:20 +03:00
rm -f $( BINS)
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
realdistclean : distclean
2006-12-18 17:58:29 +03:00
rm -f configure config.h.in