NetBSD-5.0.2/external/gpl2/libdevmapper/dist/multilog/Makefile.in

#
# Copyright (C) 2005 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@
VPATH = @srcdir@
interface = @interface@

SUBDIRS += async pthread_lock

SOURCES = libmultilog.c

LIB_STATIC = libmultilog.a

ifeq ("@LIB_SUFFIX@","dylib")
  LIB_SHARED = libmultilog.dylib
else
  LIB_SHARED = libmultilog.so
endif

LDFLAGS += -ldl -ldevmapper -lpthread -L..

include ../make.tmpl

.PHONY: install_dynamic install_static

INSTALL_TYPE = install_dynamic

ifeq ("@STATIC_LINK@", "yes")
  INSTALL_TYPE += install_static
endif

install: $(INSTALL_TYPE)

install_dynamic: libmultilog.$(LIB_SUFFIX)
	$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
		$(libdir)/libmultilog.$(LIB_SUFFIX).$(LIB_VERSION)
	$(LN_S) -f libmultilog.$(LIB_SUFFIX).$(LIB_VERSION) \
		$(libdir)/libmultilog.$(LIB_SUFFIX)

install_static: libmultilog.a
	$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
		$(libdir)/libmultilog.a.$(LIB_VERSION)
	$(LN_S) -f libmultilog.a.$(LIB_VERSION) $(libdir)/libmultilog.a