# Copyright 1997,1998 Alexandre Oliva <oliva@dcc.unicamp.br>

# See the files "COPYING" and "README" for information on usage and
# redistribution of this file.

all: stubs

JAR = jar
KAFFEH = kaffeh

HEADERS = Guarana.h Operation.h OperationFactoryInternal.h Result.h

build-always:
guarana.jar: build-always
	dir=`pwd` && \
	if test -d ../src; then cd ../src; else cd ../../../../src; fi && \
	$(MAKE) && \
	$(JAR) -c0f $$dir/$@ `find BR/unicamp/Guarana -name \*.class -print`

stubs: $(HEADERS)

$(HEADERS): guarana.jar
	CLASSPATH=guarana.jar$${CLASSPATH+:$$CLASSPATH} $(KAFFEH) -o $@ BR.unicamp.Guarana.$(@:.h=)
