summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/Makefile.in
blob: adc1f92d0a925b2cfa9b76b63a851b16df510e14 (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
#!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@

CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib/util -I$(srcdir) \
       -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
	-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@SHLIBEXT@\" -DUSE_MMAP=1 @CFLAGS@

LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ -lpopt @INFINIBAND_LIBS@

EVENTS_OBJ = lib/events/events.o lib/events/events_standard.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 lib/util/idtree.o lib/util/db_wrap.o lib/util/debug.o

CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o

CTDB_OBJ = $(CTDB_COMMON_OBJ) $(CTDB_TCP_OBJ)

OBJS = @TDBOBJ@ @TALLOCOBJ@ @LIBREPLACEOBJ@ @INFINIBAND_WRAPPER_OBJ@ $(EXTRA_OBJ) $(EVENTS_OBJ) $(CTDB_OBJ)

BINS = bin/ctdbd bin/ctdbd_test bin/ctdb_test bin/ctdb_bench bin/ctdb_messaging bin/ctdb_fetch bin/ctdb_fetch1 bin/lockwait bin/ctdb_status @INFINIBAND_BINS@

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) tests/ctdb_test.o
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ tests/ctdb_test.o $(OBJS) $(LIB_FLAGS)

bin/ctdbd: $(OBJS) direct/ctdbd.o 
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ direct/ctdbd.o $(OBJS) $(LIB_FLAGS)

bin/ctdb_status: $(OBJS) tools/ctdb_status.o 
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ tools/ctdb_status.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/ctdb_fetch1: $(OBJS) tests/ctdb_fetch1.o 
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ tests/ctdb_fetch1.o $(OBJS) $(LIB_FLAGS)

bin/ctdb_messaging: $(OBJS) tests/ctdb_messaging.o 
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ tests/ctdb_messaging.o $(OBJS) $(LIB_FLAGS)

bin/ibwrapper_test: $(OBJS) ib/ibwrapper_test.o
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(OBJS) $(LIB_FLAGS)

bin/lockwait: $(OBJS) tests/lockwait.o 
	@echo Linking $@
	@$(CC) $(CFLAGS) -o $@ tests/lockwait.o $(OBJS) $(LIB_FLAGS)

clean:
	rm -f *.o */*.o */*/*.o
	rm -f $(BINS)

distclean: clean
	rm -f *~ */*~
	rm -rf bin
	rm -f config.log config.status config.cache config.h
	rm -f Makefile

realdistclean: distclean
	rm -f configure config.h.in