Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / liblvm / Makefile
blobc36357a55811fbe207f1e5cc8765570868df4b53
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
15 srcdir = .
16 top_srcdir = ..
17 top_builddir = ..
20 SOURCES =\
21 lvm_base.c \
22 lvm_lv.c \
23 lvm_pv.c \
24 lvm_vg.c
26 LIB_NAME = liblvm2app
27 LIB_VERSION = $(LIB_VERSION_APP)
28 VERSIONED_SHLIB = $(LIB_NAME).$(LIB_SUFFIX).$(LIB_VERSION_APP)
30 ifeq ("no", "yes")
31 LIB_STATIC = $(LIB_NAME).a
32 endif
34 ifeq ("","dylib")
35 LIB_SHARED = $(LIB_NAME).dylib
36 else
37 LIB_SHARED = $(LIB_NAME).so
38 endif
40 CLEAN_TARGETS += liblvm.cflow
42 include ../make.tmpl
44 LIBS += -ldevmapper -llvm-internal
46 ifeq ("", "yes")
47 LIBS += -ldevmapper-event
48 endif
50 $(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_APP): %.$(LIB_SUFFIX)
51 rm -f $@
52 $(LN_S) $< $@
54 .PHONY: install_dynamic install_static install_include install_pkgconfig \
55 distclean_lib distclean
57 INSTALL_TYPE = install_dynamic
59 ifeq ("no", "yes")
60 INSTALL_TYPE += install_static
61 endif
63 ifeq ("no", "yes")
64 INSTALL_TYPE += install_pkgconfig
65 endif
67 install: $(INSTALL_TYPE) install_include
69 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)
83 install_pkgconfig:
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 += "; \
89 echo $(SOURCES) | \
90 sed "s/^/ /;s/ / $(top_srcdir)\/liblvm\//g;s/$$//"; \
91 ) > $@
93 cflow: liblvm.cflow
95 CLEAN_TARGETS += $(LIB_NAME).$(LIB_SUFFIX)
97 distclean_lib:
98 $(RM) $(LIB_NAME).pc
100 distclean: distclean_lib