summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/Makefile.in
blob: 6054ded89465ab8b0d87069f6a1e9b88c98c2818 (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
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# Copyright (C) 2004 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

QUORUM_LIBS = @QUORUM_LIBS@
QUORUM_CFLAGS = @QUORUM_CFLAGS@
CONFDB_LIBS = @CONFDB_LIBS@
CONFDB_CFLAGS = @CONFDB_CFLAGS@
CPG_LIBS = @CPG_LIBS@
CPG_CFLAGS = @CPG_CFLAGS@

SOURCES = \
	clvmd-command.c  \
	clvmd.c          \
	lvm-functions.c  \
	refresh_clvmd.c

ifneq (,$(findstring gulm,, "@CLVMD@,"))
	GULM = yes
endif

ifneq (,$(findstring cman,, "@CLVMD@,"))
	CMAN = yes
endif

ifneq (,$(findstring openais,, "@CLVMD@,"))
	OPENAIS = yes
endif

ifneq (,$(findstring corosync,, "@CLVMD@,"))
	COROSYNC = yes
endif

ifneq (,$(findstring all,, "@CLVMD@,"))
	GULM = yes
	CMAN = yes
	OPENAIS = yes
	COROSYNC = yes
endif

ifeq ("@DEBUG@", "yes")
	DEFS += -DDEBUG
endif

ifeq ("$(GULM)", "yes")
	SOURCES += clvmd-gulm.c tcp-comms.c
	LMLIBS += -lccs -lgulm
	DEFS += -DUSE_GULM
endif

ifeq ("$(CMAN)", "yes")
	SOURCES += clvmd-cman.c
	LMLIBS += -ldlm -lcman
	DEFS += -DUSE_CMAN
endif

ifeq ("$(OPENAIS)", "yes")
	SOURCES += clvmd-openais.c
	LMLIBS += -lSaLck -lcpg
	DEFS += -DUSE_OPENAIS
endif

ifeq ("$(COROSYNC)", "yes")
	SOURCES += clvmd-corosync.c
	LMLIBS += $(QUORUM_LIBS) $(CONFDB_LIBS) $(CPG_LIBS) -ldlm
	CFLAGS += $(QUORUM_CFLAGS) $(CONFDB_CFLAGS) $(CPG_CFLAGS)
	DEFS += -DUSE_COROSYNC
endif


TARGETS = \
	clvmd

LVMLIBS = -llvm-internal -lpthread

ifeq ("@DMEVENTD@", "yes")
	LVMLIBS += -ldevmapper-event
endif
 
LVMLIBS += -ldevmapper

DEFS += -D_REENTRANT
CFLAGS += -fno-strict-aliasing

include $(top_srcdir)/make.tmpl

INSTALL_TARGETS = \
	install_clvmd

clvmd: $(OBJECTS) $(top_srcdir)/lib/liblvm-internal.a
	$(CC) -o clvmd $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
		$(LVMLIBS) $(LMLIBS) $(LIBS)

.PHONY: install_clvmd

install_clvmd: $(TARGETS)
	$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \
		$(usrsbindir)/clvmd

install: $(INSTALL_TARGETS)

install_cluster: $(INSTALL_TARGETS)