# Class paths.  One normal, one for jikes.
JCPATH = "..\jtelos\NT;${CLASSPATH};.\classes;.\plugins"
JIKESCLASSPATH = "..\jtelos\NT;d:\jdk1.2.2\jre\lib\rt.jar;.\classes;.\plugins"

# Jikes builds a lot quicker, but it doesn't seem to be perfect.
JIKES :
	/jikes/jikes -g -classpath ${JIKESCLASSPATH} src/*.java -d "./classes"

# The "normal" build command.							  
BUILD :
	f:/jdk1.2.2/bin/javac -g -J-Djavac.pipe.output=true -classpath ${JCPATH} src/*.java \
    -d "./classes" 


# Execute the program.
RUN : MOVEPLUGINS
	f:/jdk1.2.2/bin/java -classpath ${JCPATH} OME/OME

# Build leaves plugin files in wrong location.  They need to be moved prior to
# execution.
MOVEPLUGINS : 
	mv ./classes/*.class ./plugins/;echo plugins copied.

DEBUG :
	jdb -classpath ${JCPATH} OME/OME

PROFILE : 
	java -Xrunhprof:cpu=times,depth=5,heap=sites,file=omehprof.out -Djava.compiler=NONE -classpath ${JCPATH} OME/OME
	
# Typically want to build and take a look.
OME : BUILD RUN
	@echo whee!

# Clean up our mess
CLEAN :
	rm ./plugins/*;  rm ./classes/ome/*; rm ./tmp*.kbs;


# Scripts for updating with repository.  Really shouldn't be here.
UP : CLEAN
	cp -ur * /e/ome3/program/

DOWN : 
	cp -ur /e/ome3/program/* .
