mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
23b059e7b7
Patch is inspired by Debian's extra patch. - removes OWNER & GROUP make vars they are parts of INSTALL command. - adds INSTALL_PROGRAM for executable, uses $(INSTALL) - adds INSTALL_DATA for non-executable data, uses ($INSTALL) - adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL) - adds configure option --enable-write_install - to support installatin of writable files used by distribution - replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX) - installs .a files from static builds without executable flag - installs .a files to $(usrlibdir) instead of $(libdir) - installs all static binaries to $(staticdir) - create .so links for devel package in $(usrlibdir) instead of $(libdir) - makes .so and .so.LIB_VERSION files within builddir - removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly - install LIB_SHARED via install_lib_shared target - install plugins via install_lib_shared_plugin target - prints whole 'install' command during installation instead of less informative "Installing $(something) $(somewhere)" - install multiple man pages with one INSTALL command - use DISTCLEAN_TARGETS instead of creating multiple distclean targets
105 lines
3.0 KiB
Makefile
105 lines
3.0 KiB
Makefile
#
|
|
# Copyright (C) 2005-2010 Red Hat, Inc. All rights reserved.
|
|
#
|
|
# This file is part of the device-mapper userspace tools.
|
|
#
|
|
# This copyrighted material is made available to anyone wishing to use,
|
|
# modify, copy, or redistribute it subject to the terms and conditions
|
|
# of the GNU Lesser General Public License v.2.1.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
top_builddir = @top_builddir@
|
|
|
|
SOURCES = libdevmapper-event.c
|
|
SOURCES2 = dmeventd.c
|
|
|
|
TARGETS = dmeventd
|
|
|
|
.PHONY: install_lib_dynamic install_lib_static install_include \
|
|
install_pkgconfig install_dmeventd_dynamic install_dmeventd_static \
|
|
install_lib install_dmeventd
|
|
|
|
INSTALL_DMEVENTD_TARGETS = install_dmeventd_dynamic
|
|
INSTALL_LIB_TARGETS = install_lib_dynamic
|
|
|
|
LIB_NAME = libdevmapper-event
|
|
ifeq ("@STATIC_LINK@", "yes")
|
|
LIB_STATIC = $(LIB_NAME).a
|
|
TARGETS += $(LIB_STATIC) dmeventd.static
|
|
INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
|
|
INSTALL_LIB_TARGETS += install_lib_static
|
|
endif
|
|
|
|
LIB_VERSION = $(LIB_VERSION_DM)
|
|
LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX)
|
|
|
|
CLEAN_TARGETS = dmeventd.static $(LIB_NAME).a
|
|
|
|
ifneq ($(MAKECMDGOALS),device-mapper)
|
|
SUBDIRS+=plugins
|
|
endif
|
|
|
|
CFLOW_LIST = $(SOURCES)
|
|
CFLOW_LIST_TARGET = $(LIB_NAME).cflow
|
|
CFLOW_TARGET = dmeventd
|
|
|
|
include $(top_builddir)/make.tmpl
|
|
|
|
all: device-mapper
|
|
device-mapper: $(TARGETS)
|
|
|
|
LVMLIBS += -ldevmapper-event -ldevmapper $(PTHREAD_LIBS)
|
|
|
|
dmeventd: $(LIB_SHARED) dmeventd.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ dmeventd.o \
|
|
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
|
|
|
|
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
|
dmeventd.o $(DL_LIBS) $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
|
|
|
|
ifeq ("@PKGCONFIG@", "yes")
|
|
INSTALL_LIB_TARGETS += install_pkgconfig
|
|
endif
|
|
|
|
ifneq ("$(CFLOW_CMD)", "")
|
|
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
|
|
-include $(top_builddir)/libdm/libdevmapper.cflow
|
|
-include $(top_builddir)/lib/liblvm-internal.cflow
|
|
-include $(top_builddir)/lib/liblvm2cmd.cflow
|
|
-include $(top_builddir)/daemons/dmeventd/$(LIB_NAME).cflow
|
|
-include $(top_builddir)/daemons/dmeventd/plugins/mirror/$(LIB_NAME)-lvm2mirror.cflow
|
|
endif
|
|
|
|
install_include: $(srcdir)/libdevmapper-event.h
|
|
$(INSTALL_DATA) -D $< $(includedir)/$(<F)
|
|
|
|
install_pkgconfig: libdevmapper-event.pc
|
|
$(INSTALL_DATA) -D $< $(usrlibdir)/pkgconfig/devmapper-event.pc
|
|
|
|
install_lib_dynamic: install_lib_shared
|
|
|
|
install_lib_static: $(LIB_STATIC)
|
|
$(INSTALL_DATA) -D $< $(usrlibdir)/$(<F)
|
|
|
|
install_lib: $(INSTALL_LIB_TARGETS)
|
|
|
|
install_dmeventd_dynamic: dmeventd
|
|
$(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)
|
|
|
|
install_dmeventd_static: dmeventd.static
|
|
$(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
|
|
|
|
install_dmeventd: $(INSTALL_DMEVENTD_TARGETS)
|
|
|
|
install: install_include install_lib install_dmeventd
|
|
|
|
install_device-mapper: install_include install_lib install_dmeventd
|
|
|
|
DISTCLEAN_TARGETS += libdevmapper-event.pc
|