# Makefile for JCON stuff
#
# Originally hacked together by Michael D. Ivey
# <ivey@realminfo.com>
#
# Please read README.makefile before modifying this Makefile

# DO NOT USE $< (dollar less-than)
# anywhere where it shouldn't get mangled by mkdosmake.sh
# (to see why, go look at makefile.dos)

# what do we compile with?
JAVAC=javac

# Here are all our packages.  Joy.  See README.makefile to learn
# how to add to this.
PACKAGES = $(wildcard *.java */*.java */*/*.java */*/*/*.java */*/*/*/*.java)

# flip the javas to classes, since that's what we want to make
CLASSES = $(PACKAGES:.java=.class)

.SUFFIXES:
.SUFFIXES: .java .class

.java.class:	
	@echo Compiling $*
	@$(JAVAC) $< 

jcon:	$(CLASSES)

makefile.dos:	Makefile scripts/mkdosmake.sh
	@echo Making makefile.dos from Makefile
	@cat Makefile | ./scripts/mkdosmake.sh > makefile.dos

makefile.nt:	Makefile scripts/mkntmake.sh
	@echo Making makefile.nt from Makefile
	@cat Makefile | ./scripts/mkntmake.sh > makefile.nt

clean:			
	@echo Cleaning the tree at 5 levels...should we do more?
	@rm -f *.class
	@rm -f */*.class
	@rm -f */*/*.class
	@rm -f */*/*/*.class
	@rm -f */*/*/*/*.class

update:	
	@echo Fetching latest sources + directories...
	@cvs update -d

build:	update client

daily:	clean update client
