2 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 # Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
5 # This file is part of LVM2.
7 # This copyrighted material is made available to anyone wishing to use,
8 # modify, copy, or redistribute it subject to the terms and conditions
9 # of the GNU General Public License v.2.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software Foundation,
13 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 LIB_VERSION = $(LIB_VERSION_APP)
28 VERSIONED_SHLIB = $(LIB_NAME).$(LIB_SUFFIX).$(LIB_VERSION_APP)
31 LIB_STATIC = $(LIB_NAME).a
35 LIB_SHARED = $(LIB_NAME).dylib
37 LIB_SHARED = $(LIB_NAME).so
40 CLEAN_TARGETS += liblvm.cflow
44 LIBS += -ldevmapper -llvm-internal
47 LIBS += -ldevmapper-event
50 $(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_APP): %.$(LIB_SUFFIX)
54 .PHONY: install_dynamic install_static install_include install_pkgconfig \
55 distclean_lib distclean
57 INSTALL_TYPE = install_dynamic
60 INSTALL_TYPE += install_static
64 INSTALL_TYPE += install_pkgconfig
67 install: $(INSTALL_TYPE) install_include
70 $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/lvm2app.h $(includedir)/lvm2app.h
72 install_dynamic: $(LIB_SHARED)
73 $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
74 $(libdir)/$(LIB_SHARED).$(LIB_VERSION_APP)
75 $(LN_S) -f $(LIB_SHARED).$(LIB_VERSION_APP) \
76 $(libdir)/$(LIB_SHARED)
78 install_static: $(LIB_STATIC)
79 $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
80 $(libdir)/$(LIB_STATIC).$(LIB_VERSION_APP)
81 $(LN_S) -f $(LIB_STATIC).$(LIB_VERSION_APP) $(libdir)/$(LIB_STATIC)
84 $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(LIB_NAME).pc \
85 $(usrlibdir)/pkgconfig/lvm2app.pc
87 liblvm.cflow: $(SOURCES)
88 set -e; (echo -n "SOURCES += "; \
90 sed "s/^/ /;s/ / $(top_srcdir)\/liblvm\//g;s/$$//"; \
95 CLEAN_TARGETS += $(LIB_NAME).$(LIB_SUFFIX)
100 distclean: distclean_lib