Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / daemons / clvmd / Makefile
blobdb0d4698cd4644b0708a15921b5a6737edecb630
2 # Copyright (C) 2004 Red Hat, Inc. All rights reserved.
4 # This file is part of LVM2.
6 # This copyrighted material is made available to anyone wishing to use,
7 # modify, copy, or redistribute it subject to the terms and conditions
8 # of the GNU General Public License v.2.
10 # You should have received a copy of the GNU General Public License
11 # along with this program; if not, write to the Free Software Foundation,
12 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 srcdir = .
15 top_srcdir = ../..
16 top_builddir = ../..
19 CCS_LIBS =
20 CCS_CFLAGS =
21 CMAN_LIBS =
22 CMAN_CFLAGS =
23 CONFDB_LIBS =
24 CONFDB_CFLAGS =
25 CPG_LIBS =
26 CPG_CFLAGS =
27 DLM_LIBS =
28 DLM_CFLAGS =
29 GULM_LIBS =
30 GULM_CFLAGS =
31 QUORUM_LIBS =
32 QUORUM_CFLAGS =
33 SALCK_LIBS =
34 SALCK_CFLAGS =
36 SOURCES = \
37 clvmd-command.c \
38 clvmd.c \
39 lvm-functions.c \
40 refresh_clvmd.c
42 ifeq ("no", "yes")
43 DEFS += -DDEBUG
44 endif
46 ifneq (,$(findstring gulm,, "none,"))
47 SOURCES += clvmd-gulm.c tcp-comms.c
48 LMLIBS += $(CCS_LIBS) $(GULM_LIBS)
49 CFLAGS += $(CCS_CFLAGS) $(GULM_CFLAGS)
50 DEFS += -DUSE_GULM
51 endif
53 ifneq (,$(findstring cman,, "none,"))
54 SOURCES += clvmd-cman.c
55 LMLIBS += $(CMAN_LIBS) $(CONFDB_LIBS) $(DLM_LIBS)
56 CFLAGS += $(CMAN_CFLAGS) $(CONFDB_CFLAGS) $(DLM_CFLAGS)
57 DEFS += -DUSE_CMAN
58 endif
60 ifneq (,$(findstring openais,, "none,"))
61 SOURCES += clvmd-openais.c
62 LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(SALCK_LIBS)
63 CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(SALCK_CFLAGS)
64 DEFS += -DUSE_OPENAIS
65 endif
67 ifneq (,$(findstring corosync,, "none,"))
68 SOURCES += clvmd-corosync.c
69 LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(DLM_LIBS) $(QUORUM_LIBS)
70 CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(DLM_CFLAGS) $(QUORUM_CFLAGS)
71 DEFS += -DUSE_COROSYNC
72 endif
75 TARGETS = \
76 clvmd
78 LVMLIBS = -llvm-internal -lpthread
80 ifeq ("", "yes")
81 LVMLIBS += -ldevmapper-event
82 endif
84 LVMLIBS += -ldevmapper
86 DEFS += -D_REENTRANT
87 CFLAGS += -fno-strict-aliasing
89 include ../../make.tmpl
91 INSTALL_TARGETS = \
92 install_clvmd
94 clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a
95 $(CC) $(CFLAGS) $(LDFLAGS) -o clvmd $(OBJECTS) \
96 $(LVMLIBS) $(LMLIBS) $(LIBS)
98 .PHONY: install_clvmd
100 install_clvmd: $(TARGETS)
101 $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \
102 $(usrsbindir)/clvmd
104 install: $(INSTALL_TARGETS)
106 install_cluster: $(INSTALL_TARGETS)