# Makefile for the worm package. Run from the parent dir. of worm # # Last change May 1 2002 19:40 # Description: changed to be used for making all packages at once # by Jakub Holy # # !!!! If the source files are in the dir. home/worm/ then # this Makefile should be copied to home/ and made there: home/$> make # CVS keywords (under test) # $Author: aja $ # $Date: 2003/11/08 13:19:49 $ # $Revision: 1.1.1.1 $ # # # ************** # * * # * MACROS * # * * # ************** # worm.net --------------------------- NPACKAGE = worm/net/ # independent files (can be compiled together) NTESTCLASSES = TestMain.class TestClient.class NCLASSES = ${NTESTCLASSES} Network.class # worm.chat --------------------------- CH_CLASSES = # worm (all) -------------------------- # the packages to be compiled (the directories containing .java files) PACKAGES = ${NPACKAGE} # compilator flags ( usually nothing or -g for debugging) CFLAGS = # ************** # * * # * ALL * # * * # ************** # this is the default target to be made (because it's the 1st one) all: net # ************************************************ clean # remove all .class files clean: nclean # ************** # * * # * .NET * # * * # ************** # *********************************************** compile # NCLASSES is the list of all used classes in the .net package # except the ReceiverImpl.class (because it has a spec. dependency) net: receiver ${NCLASSES} # RECEIVER stuff ------------------ # create stubs and skels for the RMI service receiver: ReceiverImpl.class rmic worm.net.ReceiverImpl # the implementation depends on the interface # DEPENDENCIES for all but the ReceiverImpl class ---------------- # NOTE: javac isn't strict about the order of compiling dependent files # test files (though a.java depends on b.java, it is not a problem to # compile first a.java and then b.java) # compiles all .java files in ${NPACKAGE} according to the dependencies # (i.e. all whose .class is mentioned in some dependency) # Note: "$<" matches "${NPACKAGE}%.java", % matches any string, # all "%" in the same rule have the same value %.class: ${NPACKAGE}%.java javac $(CFLAGS) $< # ************************************************ clean # remove all .class files nclean: rm -rf ${NPACKAGE}*.class # ************************************************ run tests # this stuff is not important and may (will) be removed # "make tmain" runs the main of the test tmain: java worm.net.TestMain tclient: java worm.net.TestClient # ************** # * * # * CHAT * # * * # ************** # *********************************************** compile