import source from lvm2 2.02.79
[external/device-mapper.git] / liblvm / Makefile.in
1 #
2 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 # Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
4 #
5 # This file is part of LVM2.
6 #
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.
10 #
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
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 top_builddir = @top_builddir@
18
19 SOURCES =\
20         lvm_misc.c \
21         lvm_base.c \
22         lvm_lv.c \
23         lvm_pv.c \
24         lvm_vg.c
25
26 LIB_NAME = liblvm2app
27 LIB_VERSION = $(LIB_VERSION_APP)
28
29 ifeq ("@STATIC_LINK@", "yes")
30   LIB_STATIC = $(LIB_NAME).a
31 endif
32
33 LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX)
34
35 CLEAN_TARGETS += liblvm.cflow $(LIB_NAME).a
36
37 EXPORTED_HEADER = $(srcdir)/lvm2app.h
38 EXPORTED_FN_PREFIX = lvm
39
40 include $(top_builddir)/make.tmpl
41
42 LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
43
44 ifeq ("@DMEVENTD@", "yes")
45   LIBS += -ldevmapper-event
46 endif
47
48 .PHONY: install_dynamic install_static install_include install_pkgconfig
49
50 INSTALL_TYPE = install_dynamic
51
52 ifeq ("@STATIC_LINK@", "yes")
53   INSTALL_TYPE += install_static
54 endif
55
56 ifeq ("@PKGCONFIG@", "yes")
57   INSTALL_TYPE += install_pkgconfig
58 endif
59
60 install: $(INSTALL_TYPE) install_include
61
62 install_include: $(srcdir)/lvm2app.h
63         $(INSTALL_DATA) -D $< $(includedir)/$(<F)
64
65 install_dynamic: install_lib_shared
66
67 install_static: $(LIB_STATIC)
68         $(INSTALL_DATA) -D $< $(usrlibdir)/$(<F)
69
70 install_pkgconfig: $(LIB_NAME).pc
71         $(INSTALL_DATA) -D $< $(pkgconfigdir)/lvm2app.pc
72
73 liblvm.cflow: $(SOURCES)
74         set -e; (echo -n "SOURCES += "; \
75                  echo $(SOURCES) | \
76                  sed "s/^/ /;s/ / $(top_srcdir)\/liblvm\//g;s/$$//"; \
77                  ) > $@
78
79 cflow: liblvm.cflow
80
81 DISTCLEAN_TARGETS += $(LIB_NAME).pc .exported_symbols_generated