# Build the Guarana library.
#
# Copyright (c) 1997 T. J. Wilkinson & Associates, London, UK.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Written by Tim Wilkinson <tim@tjwassoc.demon.co.uk>.
# Modified by Alexandre Oliva <oliva@dcc.unicamp.br>, 1997.

prefix=		@prefix@
classdir=	@datadir@/kaffe
propdir=	@datadir@/kaffe/lib
srcdir=		@srcdir@
INSTALL=	@INSTALL@
INSTALL_DATA=	@INSTALL_DATA@
MKDIR=		@MKDIR@

all:
		@(cd lib; $(MAKE))

clean:
		(cd lib; $(MAKE) clean)

distclean:
		(cd lib; $(MAKE) distclean)
		-rmdir lib
		rm -f Makefile

install:
		(cd lib; $(MAKE) install)
		test -d $(classdir) || $(MKDIR) $(classdir)
		test -d $(propdir) || $(MKDIR) $(propdir)
		$(INSTALL_DATA) $(srcdir)/classes/guarana.jar $(classdir)/guarana.jar

JAR=		jar

jar:
		cd $(srcdir)/classes/src && \
		$(JAR) -c0f guarana.jar `find BR/unicamp/Guarana -name \*.class`
		cd $(srcdir)/classes && \
		rm -f guarana.jar && \
		mv -f src/guarana.jar ./guarana.jar
