JAVA_SOURCES = @@`find . -name '*.java'`@@
SOURCE_DIRS = org/gimec/msnj
JAVAC = javac

msnj.jar: classfiles
	jar cf msnj.jar `find . -name '*.class'`

classfiles: $(JAVA_SOURCES)
	$(JAVAC) $(JAVA_SOURCES)

docs: $(JAVA_SOURCES) docs/overview.html
	javadoc -d docs -overview docs/overview.html -use -windowtitle 'MSNj API Documentation' $(JAVA_SOURCES)

Makefile: . $(SOURCE_DIRS)
	./bt.pl < Makefile.in > Makefile

all: classfiles Makefile

clean:
	rm -f msnj.jar `find . -name '*.class'`
