2005-04-28 02:32:00 +04:00
#
2011-09-25 01:00:52 +04:00
# Copyright (C) 2005-2011 Red Hat, Inc. All rights reserved.
2005-04-28 02:32:00 +04:00
#
# 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
2005-12-02 18:39:16 +03:00
# of the GNU Lesser General Public License v.2.1.
2005-04-28 02:32:00 +04:00
#
2005-12-02 18:39:16 +03:00
# You should have received a copy of the GNU Lesser General Public License
2005-04-28 02:32:00 +04:00
# along with this program; if not, write to the Free Software Foundation,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2005-04-28 02:32:00 +04:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2009-10-02 23:10:31 +04:00
top_builddir = @top_builddir@
2021-03-20 01:10:55 +03:00
abs_srcdir = @abs_srcdir@
2005-04-28 02:32:00 +04:00
2007-01-08 18:18:52 +03:00
SOURCES = libdevmapper-event.c
2010-03-29 18:17:59 +04:00
SOURCES2 = dmeventd.c
2009-10-13 06:35:26 +04:00
TARGETS = dmeventd
2021-03-20 01:10:55 +03:00
CFLOW_SOURCES = $( addprefix $( srcdir) /, $( SOURCES) $( SOURCES2) \
plugins/lvm2/dmeventd_lvm.c \
plugins/mirror/dmeventd_mirror.c \
plugins/raid/dmeventd_raid.c \
plugins/snapshot/dmeventd_snapshot.c \
plugins/thin/dmeventd_thin.c \
plugins/vdo/dmeventd_vdo.c \
)
CFLOW_TARGET := $( TARGETS)
2009-10-13 06:35:26 +04:00
.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
2005-04-28 02:32:00 +04:00
2010-03-29 18:07:01 +04:00
LIB_NAME = libdevmapper-event
2009-04-08 18:04:35 +04:00
i f e q ( "@STATIC_LINK@" , "yes" )
2010-03-29 18:07:01 +04:00
LIB_STATIC = $( LIB_NAME) .a
TARGETS += $( LIB_STATIC) dmeventd.static
2009-10-13 06:35:26 +04:00
INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
INSTALL_LIB_TARGETS += install_lib_static
2009-04-08 18:04:35 +04:00
e n d i f
2009-10-13 06:35:26 +04:00
2008-11-04 02:01:21 +03:00
LIB_VERSION = $( LIB_VERSION_DM)
2010-04-10 01:42:48 +04:00
LIB_SHARED = $( LIB_NAME) .$( LIB_SUFFIX)
2021-04-08 20:44:53 +03:00
LIBS = $( PTHREAD_LIBS) -L$( interfacebuilddir) -ldevmapper
2005-12-02 18:39:16 +03:00
2010-03-29 18:11:17 +04:00
CLEAN_TARGETS = dmeventd.static $( LIB_NAME) .a
2007-01-08 18:18:52 +03:00
2008-11-04 02:01:21 +03:00
i f n e q ( $( MAKECMDGOALS ) , d e v i c e - m a p p e r )
SUBDIRS += plugins
e n d i f
2010-03-29 18:11:17 +04:00
CFLOW_LIST = $( SOURCES)
CFLOW_LIST_TARGET = $( LIB_NAME) .cflow
2010-08-17 02:54:35 +04:00
EXPORTED_HEADER = $( srcdir) /libdevmapper-event.h
EXPORTED_FN_PREFIX = dm_event
2010-03-04 12:51:37 +03:00
i n c l u d e $( top_builddir ) / m a k e . t m p l
2008-11-04 02:01:21 +03:00
2009-10-13 06:35:26 +04:00
all : device -mapper
device-mapper : $( TARGETS )
2021-04-03 23:55:20 +03:00
plugins.device-mapper : $( LIB_SHARED )
2005-04-28 02:32:00 +04:00
2013-12-05 17:03:10 +04:00
CFLAGS_dmeventd.o += $( EXTRA_EXEC_CFLAGS)
2013-12-04 13:16:15 +04:00
2010-04-10 01:42:48 +04:00
dmeventd : $( LIB_SHARED ) dmeventd .o
2024-04-08 14:10:16 +03:00
$( SHOW) " [CC] $@ "
2021-04-08 20:44:53 +03:00
$( Q) $( CC) $( CFLAGS) $( LDFLAGS) $( EXTRA_EXEC_LDFLAGS) $( ELDFLAGS) dmeventd.o \
-o $@ $( DL_LIBS) $( DMEVENT_LIBS) $( LIBS)
2007-01-08 18:18:52 +03:00
2018-05-14 14:16:43 +03:00
dmeventd.static : $( LIB_STATIC ) dmeventd .o
2024-04-08 14:10:16 +03:00
$( SHOW) " [CC] $@ "
2023-02-22 16:41:08 +03:00
$( Q) $( CC) $( CFLAGS) $( LDFLAGS) $( STATIC_LDFLAGS) -static dmeventd.o \
2017-08-01 01:01:07 +03:00
-o $@ $( DL_LIBS) $( DMEVENT_LIBS) $( LIBS) $( STATIC_LIBS)
2005-04-28 02:32:00 +04:00
2006-04-19 20:38:56 +04:00
i f e q ( "@PKGCONFIG@" , "yes" )
2009-10-13 06:35:26 +04:00
INSTALL_LIB_TARGETS += install_pkgconfig
2006-04-19 20:38:56 +04:00
e n d i f
2010-04-10 01:42:48 +04:00
install_include : $( srcdir ) /libdevmapper -event .h
2024-04-08 14:10:16 +03:00
$( SHOW) " [INSTALL] $( <F) "
2018-11-29 19:09:27 +03:00
$( Q) $( INSTALL_DATA) -D $< $( includedir) /$( <F)
2006-04-19 19:23:10 +04:00
2010-04-10 01:42:48 +04:00
install_pkgconfig : libdevmapper -event .pc
2024-04-08 14:10:16 +03:00
$( SHOW) " [INSTALL] $< "
2018-11-29 19:09:27 +03:00
$( Q) $( INSTALL_DATA) -D $< $( pkgconfigdir) /devmapper-event.pc
2009-10-13 06:35:26 +04:00
2010-04-10 01:42:48 +04:00
install_lib_dynamic : install_lib_shared
2006-04-19 20:38:56 +04:00
2010-04-10 01:42:48 +04:00
install_lib_static : $( LIB_STATIC )
2024-04-08 14:10:16 +03:00
$( SHOW) " [INSTALL] $< "
2018-11-29 19:09:27 +03:00
$( Q) $( INSTALL_DATA) -D $< $( usrlibdir) /$( <F)
2005-04-28 02:32:00 +04:00
2009-10-13 06:35:26 +04:00
install_lib : $( INSTALL_LIB_TARGETS )
install_dmeventd_dynamic : dmeventd
2024-04-08 14:10:16 +03:00
$( SHOW) " [INSTALL] $< "
2018-11-29 19:09:27 +03:00
$( Q) $( INSTALL_PROGRAM) -D $< $( sbindir) /$( <F)
2009-10-13 06:35:26 +04:00
install_dmeventd_static : dmeventd .static
2024-04-08 14:10:16 +03:00
$( SHOW) " [INSTALL] $< "
2018-11-29 19:09:27 +03:00
$( Q) $( INSTALL_PROGRAM) -D $< $( staticdir) /$( <F)
2009-10-13 06:35:26 +04:00
install_dmeventd : $( INSTALL_DMEVENTD_TARGETS )
install : install_include install_lib install_dmeventd
2009-11-13 15:48:01 +03:00
install_device-mapper : install_include install_lib install_dmeventd
2008-06-27 19:36:51 +04:00
2011-09-25 01:00:52 +04:00
DISTCLEAN_TARGETS += libdevmapper-event.pc