# Generated automatically from Makefile.in by configure.
#
# tools/Makefile
#
# Copyright (C) 1997 - 2000  Heinz Mauelshagen, Germany
#
# February 1997
# February 2000
#
# lvm tools are free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# lvm tools are distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with GNU CC; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. 
#
#



SUBDIRS = lib man8 .
TOP = ..
srcdir = .
STATIC_LINK = no

# Link decision (archive or shared library)
# See './configure --help' for info on setting this - default is dynamic
# linking
ifeq ($(STATIC_LINK),yes)
  LDFLAGS += -static
endif

include ../make.tmpl
include tools_and_lib.make.tmpl

LOADLIBES = -L$(topobjdir)/tools/lib
LDLIBS = -llvm-10 -luLinux_Storage
LDFLAGS += 

ALL := $(notdir $(ALL_SOURCES:.c=))
ALL_RM = $(ALL) $(ALL_OBJECTS)
ALL_SCRIPTS = lvmcreate_initrd

$(ALL_SOURCES):	Makefile lvm_user.h lib/liblvm.h

$(ALL_OBJECTS):	Makefile lib/liblvm.h lvm_user.h

all_this:	$(ALL_OBJECTS) $(ALL) $(ALL_SOURCES) $(ALL_HEADERS) $(OTHER_DEP) $(LIBS)
		@echo ""
		@echo "Done Tools parts"
		@echo ""
		@touch ../.touchbuilt

strip:		$(ALL_TARGETS)
	@echo
	@echo "Stripping all executables..."
	@echo
	@strip $(ALL_TARGETS) >/dev/null 2>&1

list:		$(ALL_TARGETS)
	@ls -l $(ALL_TARGETS)

l:	list

install-bin:	$(ALL_TARGETS) $(ALL_SCRIPTS)
	@echo "*** Installing $(ALL_TARGETS) $(ALL_SCRIPTS) in $(DESTDIR)$(sbindir) ***"
	@for f in $(ALL_TARGETS); \
	do \
  	   rm -f $(DESTDIR)$(sbindir)/$$f; \
	   /usr/bin/install -c -d $(DESTDIR)$(sbindir); \
	   /usr/bin/install -c -o $(OWNER) -g $(GROUP) -m 555 -s $$f $(DESTDIR)$(sbindir)/$$f; \
	done
	@for f in $(ALL_SCRIPTS); \
	do \
	   rm -f $(DESTDIR)$(sbindir)/$$f; \
	   /usr/bin/install -c -d $(DESTDIR)$(sbindir); \
	   /usr/bin/install -c -o $(OWNER) -g $(GROUP) -m 555 $(srcdir)/$$f $(DESTDIR)$(sbindir)/$$f; \
	done

remove-bin:	$(ALL_TARGETS) $(ALL_SCRIPTS)
	@echo "*** Removing $(ALL_TARGETS) $(ALL_SCRIPTS) from $(DESTDIR)$(sbindir) ***"
	@for f in $(ALL_TARGETS) $(ALL_SCRIPTS); \
	do \
	   rm -f $(DESTDIR)$(sbindir)/$$f; \
	done

install_this:	install-bin

remove_this:	remove-bin

clean_this:
	rm -f $(ALL_RM)

clean_targets:
	rm -f $(ALL_TARGETS)

distclean: clean
	$(MAKE) -C lib distclean
	$(MAKE) -C man8 distclean
	rm -f Makefile tools_and_lib.make.tmpl
