summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/Makefile.in
blob: 01c3f4c62ef12300362adb0b8aa583fa5aa2877e (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
#
# 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@

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

ifeq ("@CLVMD@", "gulm")
	GULM = yes
endif

ifeq ("@CLVMD@", "cman")
	CMAN = yes
endif

ifeq ("@CLVMD@", "openais")
	OPENAIS = yes
	GULM = no
	CMAN = no
endif

ifeq ("@CLVMD@", "all")
	GULM = yes
	CMAN = yes
	OPENAIS = no
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

TARGETS = \
	clvmd

LVMLIBS = -llvm -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.a
	$(CC) -o clvmd $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
		$(LVMLIBS) $(LMLIBS) $(LIBS)

.PHONY: install_clvmd

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

install: $(INSTALL_TARGETS)

install_cluster: $(INSTALL_TARGETS)