# # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. # Copyright (C) 2004-2018 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. # # 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 General Public License v.2. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ all: device-mapper SOURCES2 = dmsetup.c TARGETS_DM = dmsetup install_device-mapper: install_dmsetup_dynamic ifeq ("@STATIC_LINK@", "yes") TARGETS_DM += dmsetup.static install_device-mapper: install_dmsetup_static endif # dmfilemapd support ifeq ("@BUILD_DMFILEMAPD@", "yes") SOURCES2 += dmfilemapd.c TARGETS_DM += dmfilemapd install_dmfilemapd: install_dmfilemapd_dynamic ifeq ("@STATIC_LINK@", "yes") TARGETS_DM += dmfilemapd.static install_dmfilemapd: install_dmfilemapd_static endif endif CLEAN_TARGETS = $(LDDEPS) .exported_symbols_generated \ dmfilemapd dmfilemapd.static \ dmsetup dmsetup.static include $(top_builddir)/libdm/make.tmpl CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) CFLAGS_dmfilemapd.o += $(EXTRA_EXEC_CFLAGS) LDFLAGS += -L$(interfacebuilddir) DMLIBS = -ldevmapper dmsetup: dmsetup.o @echo " [CC] $@" $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ -o $@ $+ $(DMLIBS) dmsetup.static: dmsetup.o @echo " [CC] $@" $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \ -o $@ $+ $(DMLIBS) $(STATIC_LIBS) install_dmsetup_dynamic: dmsetup @echo " [INSTALL] $<" $(Q) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(