2 # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 # Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
5 # This file is part of the device-mapper userspace tools.
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 Lesser General Public License v.2.1.
11 # You should have received a copy of the GNU Lesser 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
34 $(interface
)/libdm-iface.c
36 INCLUDES
= -I
$(srcdir)/$(interface
) -I
$(srcdir)
39 LIB_STATIC
= $(interface
)/libdevmapper.a
43 LIB_SHARED
= $(interface
)/libdevmapper.dylib
45 LIB_SHARED
= $(interface
)/libdevmapper.so
47 VERSIONED_SHLIB
= libdevmapper.
$(LIB_SUFFIX
).
$(LIB_VERSION_DM
)
48 LIB_VERSION
= $(LIB_VERSION_DM
)
50 DEFS
+= -DDM_DEVICE_UID
=0 -DDM_DEVICE_GID
=0 \
57 .PHONY
: install_dynamic install_static install_include \
58 install_ioctl install_ioctl_static \
61 INSTALL_TYPE
= install_dynamic
64 INSTALL_TYPE
+= install_static
68 INSTALL_TYPE
+= install_pkgconfig
71 install: $(INSTALL_TYPE
) install_include
73 install_device-mapper
: install
76 $(INSTALL
) -D
$(OWNER
) $(GROUP
) -m
444 $(srcdir)/libdevmapper.h \
77 $(includedir)/libdevmapper.h
79 install_dynamic
: install_ioctl
80 $(LN_S
) -f libdevmapper.
$(LIB_SUFFIX
).
$(LIB_VERSION_DM
) \
81 $(libdir)/libdevmapper.
$(LIB_SUFFIX
)
83 install_static
: install_ioctl_static
84 $(LN_S
) -f libdevmapper.a.
$(LIB_VERSION_DM
) $(libdir)/libdevmapper.a
86 install_ioctl
: ioctl
/libdevmapper.
$(LIB_SUFFIX
)
87 $(INSTALL
) -D
$(OWNER
) $(GROUP
) -m
555 $(STRIP
) $< \
88 $(libdir)/libdevmapper.
$(LIB_SUFFIX
).
$(LIB_VERSION_DM
)
91 $(INSTALL
) -D
$(OWNER
) $(GROUP
) -m
444 libdevmapper.
pc \
92 $(usrlibdir
)/pkgconfig
/devmapper.
pc
94 install_ioctl_static
: ioctl
/libdevmapper.a
95 $(INSTALL
) -D
$(OWNER
) $(GROUP
) -m
555 $(STRIP
) $< \
96 $(libdir)/libdevmapper.a.
$(LIB_VERSION_DM
)
98 $(VERSIONED_SHLIB
): %.
$(LIB_SUFFIX
).
$(LIB_VERSION_DM
): $(interface
)/%.
$(LIB_SUFFIX
)
101 rm -f libdevmapper.
$(LIB_SUFFIX
)
102 $(LN_S
) $< libdevmapper.
$(LIB_SUFFIX
)
104 CLEAN_TARGETS
+= libdevmapper.
$(LIB_SUFFIX
)
106 .PHONY
: distclean_lib
distclean
109 $(RM
) libdevmapper.
pc
111 distclean: distclean_lib