################################################################################
# AgentWorld Makefile
################################################################################

# Be sure to also read the following file.
#
#   ~shavlik/public/html/cs540/AgentWorld/Java/RunAgentWorld.java
#
# Especially make sure you've properly set CLASSPATH, which can
# be done by adding the following line to your ~/.cshrc.local file in Unix:
#
#  setenv CLASSPATH  .:./classes:/p/course/cs540-shavlik/public/AgentWorld/Packages

# You'll need to create a subdir called Java/ and edit the line below.
# You may wish to create additional Java files - if so, add them to the
# list.  (Be sure to also include your login name in the names of any 
# additional files you create.)

JAVAFILES = Java/RunAgentWorld.java Java/<YourLoginName>Player.java

# You'll have to edit both of the above two files in order to get
# your agent to operate in the Agent World.

# You can use
#
#   ~shavlik/public/html/cs540/AgentWorld/Java/SamplePlayer.java
#
# as a starting point for <YourLoginName>Player.java
# (but do NOT include the <>'s in this file name!).

# You'll also need to create a subdir called "classes" - this makefile
# will put your 'compiled' Java files there.  In other words, do something
# like the following ('%' stands for your Unix command-line prompt):
#
#   % cd ~/private
#   % mkdir CS540
#   % mkdir CS540-HW1
#   % cd CS540-HW1
#   % mkdir classes
#   % mkdir Java
#   % cp /p/course/cs540-shavlik/public/AgentWorld/Java/SamplePlayer.java  Java
#   % cp /p/course/cs540-shavlik/public/AgentWorld/Java/RunAgentWorld.java Java
#   % cp /p/course/cs540-shavlik/public/AgentWorld/Makefile .
#   % cp /p/course/cs540-shavlik/public/AgentWorld/savedShavlikNetwork.jws . 
#
# (Be sure to read the notes in SamplePlayer.java - you'll need to
# rename that file and edit its contents.) 

# You might also wish to look at some of the (built-in) utility files in:
#
#   ~shavlik/public/html/cs540/AgentWorld/Java/Utils.java
#

# To make ('compile') your Java files, do:
#   make JavaStuff
# or simply 
#   make

# To run, type the following from the same directory as that of your Makefile:

#   java RunAgentWorld

# (In Microsoft's J++, use "jview" instead of "java")
# Be sure you've properly set your CLASSPATH variable, as described 
# in Java/RunAgentWorld.java

# If you wish to use the trained neural network, you need to have
# the "savedShavlikNetwork.jws" file in the same directory from 
# which you call Java.

# (I don't know much about Makefiles, so if you have any expert tips
# on how to improve this file, send the tips to me.  Thanks.)

# Finally, note that the above Web addresses (URL's) also
# can be accessed in the AFS file system at:
#
#  /p/course/cs540-shavlik/public/AgentWorld/Java
#

################################################################################
# Logical Symbols
################################################################################

PATHtoUSE  = /s/java

CLASSDIR   =  ./classes/
PACKAGES   = /p/course/cs540-shavlik/public/AgentWorld/Packages/
CLASSPATH  = -classpath .:$(CLASSDIR):$(PACKAGES):$(PATHtoUSE)/lib/classes.zip
JAVA       =  $(PATHtoUSE)/bin/javac
# Warn about use of deprecated Java 1.0.2 constructs (we're now at Java 1.1).
JAVAFLAGS  = -deprecation -d $(CLASSDIR) $(CLASSPATH)

################################################################################
################################################################################
#
#       Compilation
#
################################################################################
################################################################################

JavaStuff:$(JAVA_FILES)
	$(JAVA) $(JAVAFLAGS) $(JAVAFILES) 

################################################################################

