2005-04-28 02:32:00 +04:00
#
2007-08-21 20:26:07 +04:00
# Copyright (C) 2005-2007 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,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
2007-01-08 18:18:52 +03:00
SOURCES = libdevmapper-event.c
2005-04-28 02:32:00 +04:00
2009-04-08 18:04:35 +04:00
i f e q ( "@STATIC_LINK@" , "yes" )
2005-12-02 18:39:16 +03:00
LIB_STATIC = libdevmapper-event.a
2009-04-08 18:04:35 +04:00
e n d i f
2008-11-04 02:01:21 +03:00
LIB_VERSION = $( LIB_VERSION_DM)
2005-04-28 02:32:00 +04:00
2005-04-28 21:32:27 +04:00
i f e q ( "@LIB_SUFFIX@" , "dylib" )
2005-12-02 18:39:16 +03:00
LIB_SHARED = libdevmapper-event.dylib
2005-04-28 21:32:27 +04:00
e l s e
2005-12-02 18:39:16 +03:00
LIB_SHARED = libdevmapper-event.so
2008-06-27 19:36:51 +04:00
VERSIONED_SHLIB = $( LIB_SHARED) .$( LIB_VERSION)
2005-04-28 21:32:27 +04:00
e n d i f
2005-12-02 18:39:16 +03:00
2007-01-08 18:18:52 +03:00
TARGETS = dmeventd
CLEAN_TARGETS = dmeventd.o
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
i n c l u d e $( top_srcdir ) / m a k e . t m p l
all : dmeventd
2009-04-08 18:04:35 +04:00
device-mapper : dmeventd $( LIB_STATIC )
2005-04-28 02:32:00 +04:00
2007-01-08 18:18:52 +03:00
LDFLAGS += -ldl -ldevmapper -lpthread
2005-12-05 14:16:48 +03:00
CLDFLAGS += -ldl -ldevmapper -lpthread
2008-06-27 19:36:51 +04:00
dmeventd : $( LIB_SHARED ) $( VERSIONED_SHLIB ) dmeventd .o
2007-01-11 19:23:22 +03:00
$( CC) -o $@ dmeventd.o $( CFLAGS) $( LDFLAGS) \
2007-01-08 18:18:52 +03:00
-L. -ldevmapper-event $( LIBS) -rdynamic
2006-04-19 20:38:56 +04:00
.PHONY : install_dynamic install_static install_include \
2007-01-08 18:18:52 +03:00
install_pkgconfig install_dmeventd
2005-04-28 21:32:27 +04:00
2005-12-02 18:39:16 +03:00
INSTALL_TYPE = install_dynamic
2005-04-28 02:32:00 +04:00
2005-12-02 18:39:16 +03:00
i f e q ( "@STATIC_LINK@" , "yes" )
INSTALL_TYPE += install_static
e n d i f
2005-04-28 02:32:00 +04:00
2006-04-19 20:38:56 +04:00
i f e q ( "@PKGCONFIG@" , "yes" )
INSTALL_TYPE += install_pkgconfig
e n d i f
2007-01-08 18:18:52 +03:00
install : $( INSTALL_TYPE ) install_include install_dmeventd
2005-04-28 02:32:00 +04:00
2009-05-11 14:12:35 +04:00
install_device-mapper : $( INSTALL_TYPE ) install_include install_dmeventd
2008-11-04 20:25:32 +03:00
2006-04-19 19:23:10 +04:00
install_include :
$( INSTALL) -D $( OWNER) $( GROUP) -m 444 libdevmapper-event.h \
$( includedir) /libdevmapper-event.h
2005-12-02 18:39:16 +03:00
install_dynamic : libdevmapper -event .$( LIB_SUFFIX )
$( INSTALL) -D $( OWNER) $( GROUP) -m 555 $( STRIP) $< \
$( libdir) /libdevmapper-event.$( LIB_SUFFIX) .$( LIB_VERSION)
$( LN_S) -f libdevmapper-event.$( LIB_SUFFIX) .$( LIB_VERSION) \
$( libdir) /libdevmapper-event.$( LIB_SUFFIX)
2006-04-19 20:38:56 +04:00
2007-01-08 18:18:52 +03:00
install_dmeventd : dmeventd
$( INSTALL) -D $( OWNER) $( GROUP) -m 555 $( STRIP) $< $( sbindir) /$<
2006-04-19 20:38:56 +04:00
install_pkgconfig :
2006-04-19 21:24:00 +04:00
$( INSTALL) -D $( OWNER) $( GROUP) -m 444 libdevmapper-event.pc \
$( usrlibdir) /pkgconfig/devmapper-event.pc
2005-12-02 18:39:16 +03:00
install_static : libdevmapper -event .a
$( INSTALL) -D $( OWNER) $( GROUP) -m 555 $( STRIP) $< \
$( libdir) /libdevmapper-event.a.$( LIB_VERSION)
$( LN_S) -f libdevmapper-event.a.$( LIB_VERSION) $( libdir) /libdevmapper-event.a
2005-04-28 02:32:00 +04:00
2008-06-27 19:36:51 +04:00
$(VERSIONED_SHLIB) : $( LIB_SHARED )
$( RM) -f $@
$( LN_S) $( LIB_SHARED) $@
2006-04-19 20:38:56 +04:00
.PHONY : distclean_lib distclean
distclean_lib :
2006-04-19 21:15:08 +04:00
$( RM) libdevmapper-event.pc
2006-04-19 20:38:56 +04:00
distclean : distclean_lib