#
# Copyright (C) 1997 - 1999  Heinz Mauelshagen, Germany
#
# February 1997
# January 1999
#
# 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 = .

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

ARCHIVE = liblvm.a
SO = liblvm.so

ALL_RM = $(ALL_OBJECTS) $(ARCHIVE) $(SO)

all_this: $(ARCHIVE) $(SO)
	@echo ""
	@echo "Done Library parts"
	@echo ""

install_this:
	rm -f /lib/$(SO)
	cp -p $(SO) /lib
	chmod 555 /lib/$(SO)

remove_this:
	rm -f /lib/$(SO)

$(ALL_SOURCES):	liblvm.h $(TOP)/kernel/lvm.h

$(ALL_OBJECTS):	liblvm.h $(TOP)/kernel/lvm.h

$(ARCHIVE):	$(ALL_OBJECTS)
	@echo "Making User parts"
	rm -f $(ARCHIVE)
	ar r $(ARCHIVE) $(ALL_OBJECTS)
	ranlib $@

$(SO):	$(ALL_OBJECTS)
	ld -shared -o $(SO) $(ALL_OBJECTS)

clean_this:
	rm -f $(ALL_RM)
