1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm/dm-tools/Makefile.in
Zdenek Kabelac 3d26bde1c0 make: cflow target works again
Restored 'make cflow' functinality.
Produces some quick referece of function chaining and usage.
2021-03-20 00:05:01 +01:00

104 lines
2.9 KiB
Makefile

#
# 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
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES2))
CFLOW_TARGET := $(TARGETS_DM)
-include $(top_builddir)/libdm/libdevmapper.cflow
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)/$(<F)
$(Q) $(LN_S) -f $(<F) $(sbindir)/dmstats
install_dmsetup_static: dmsetup.static
@echo " [INSTALL] $<"
$(Q) $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
$(Q) $(LN_S) -f $(<F) $(staticdir)/dmstats
dmfilemapd: dmfilemapd.o $(LIB_SHARED)
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-o $@ $+ $(DMLIBS)
dmfilemapd.static: dmfilemapd.o $(LIB_STATIC)
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static \
-o $@ $+ $(DMLIBS) $(STATIC_LIBS)
install_dmfilemapd_dynamic: dmfilemapd
@echo " [INSTALL] $<"
$(Q) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)
install_dmfilemapd_static: dmfilemapd.static
@echo " [INSTALL] $<"
$(Q) $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
.PHONY: install_dmsetup_dynamic install_dmsetup_static
.PHONY: install_dmfilemapd install_dmfilemapd_static
install: install_device-mapper install_dmfilemapd
device-mapper: $(TARGETS_DM)