
# Your Java compiler
JAVAC = javac

# Compile flags
JFLAGS = -g

# Where your Jini distribution was unpacked
JINI_HOME = /home/jan/tmpdir/jini1_1

# Where your HTTP server delivers its web pages from
HTML_HOME = /home/WWW/htdocs

# The subdirectory that is used as codebase in HTML_HOME
CODEBASE = classes


##########################################
# No changes should be needed below here #
##########################################

CLASSPATH = .:$(JINI_HOME)/lib/reggie.jar:$(JINI_HOME)/lib/jini-core.jar:$(JINI_HOME)/lib/jini-ext.jar:$(JINI_HOME)/lib/sun-util.jar:$(RCX_PKG)

%.class: %.java
	$(JAVAC) $(JFLAGS) -deprecation -classpath $(CLASSPATH)  $<

RMIC_ARGS = -v1.2 -d . -classpath $(CLASSPATH):/usr/local/src/jdk1.2.2/jre/lib/rt.jar

CLASSES = \
	AttackInterface.class \
	RemoteAttackInterface.class \
	Attack.class \
	AttackClient.class \
	AttackServer.class \
	AttackRegistrar.class \
	LookupService.class

# These classes need to be known to the HTTP server
# for copying across to clients
HTML_CLASSES = \
	$(HTML_HOME)/$(CODEBASE)/Attack.class \
	$(HTML_HOME)/$(CODEBASE)/RemoteAttackInterface.class \
	$(HTML_HOME)/$(CODEBASE)/AttackRegistrar.class 


# These classes need to have rmic run on them as they
# are exported to RMI
STUBS = \
	Attack_Stub.class

classes: $(CLASSES) $(STUBS) $(HTML_CLASSES)


#
# Stub relations
#

Attack_Stub.class : Attack.class
	rmic  $(RMIC_ARGS) Attack 
	cp -P Attack_Stub.class Attack.class AttackInterface.class RemoteAttackInterface.class  $(HTML_HOME)/$(CODEBASE)

#
# HTML dependencies
#

$(HTML_HOME)/$(CODEBASE)/Attack.class: \
	Attack.class
	cp -P Attack.class $(HTML_HOME)/$(CODEBASE)

$(HTML_HOME)/$(CODEBASE)/AttackRegistrar.class: \
	AttackRegistrar.class
	cp -P AttackRegistrar.class $(HTML_HOME)/$(CODEBASE)

