2
# Copyright (C) 2011-2012 Red Hat, Inc.
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 Lesser General Public License v.2.1.
10
# You should have received a copy of the GNU Lesser 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
15
top_srcdir = @top_srcdir@
16
top_builddir = @top_builddir@
18
SOURCES = lvmetad-core.c
19
SOURCES2 = testclient.c
21
TARGETS = lvmetad lvmetad-testclient
23
.PHONY: install_lvmetad
25
CFLOW_LIST = $(SOURCES)
26
CFLOW_LIST_TARGET = $(LIB_NAME).cflow
27
CFLOW_TARGET = lvmetad
29
include $(top_builddir)/make.tmpl
31
INCLUDES += -I$(top_srcdir)/libdaemon/server
32
LVMLIBS = -ldaemonserver $(LVMINTERNAL_LIBS) -ldevmapper
34
LIBS += $(PTHREAD_LIBS)
36
LDFLAGS += -L$(top_builddir)/libdaemon/server
37
CLDFLAGS += -L$(top_builddir)/libdaemon/server
39
lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
40
$(top_builddir)/libdaemon/server/libdaemonserver.a
41
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \
42
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
44
# TODO: No idea. No idea how to test either.
45
#ifneq ("$(CFLOW_CMD)", "")
46
#CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
47
#-include $(top_builddir)/libdm/libdevmapper.cflow
48
#-include $(top_builddir)/lib/liblvm-internal.cflow
49
#-include $(top_builddir)/lib/liblvm2cmd.cflow
50
#-include $(top_builddir)/daemons/dmeventd/$(LIB_NAME).cflow
51
#-include $(top_builddir)/daemons/dmeventd/plugins/mirror/$(LIB_NAME)-lvm2mirror.cflow
54
install_lvmetad: lvmetad
55
$(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)
57
install_lvm2: install_lvmetad