1 # define compiler and compiler flag variables
5 JUNIT=/usr/share/junit/junit.jar
6 JCOPS=src/main/java/jcops.jar
7 PCMM=src/main/java/pcmm.jar
8 CLASSPATH = -classpath .:$(PCMM):$(JCOPS):$(JUNIT)
9 JFLAGS = -encoding UTF-8 $(CLASSPATH)
14 # Clear any default targets for building .class files from .java files; we
15 # will provide our own target entry to do this in this makefile.
16 # make has a set of default targets for different suffixes (like .c.o)
17 # Currently, clearing the default for .java.class is not necessary since
18 # make does not have a definition for this target, but later versions of
19 # make may, so it doesn't hurt to make sure that we clear any default
20 # definitions for these
23 .SUFFIXES: .java .class
27 # Here is our target entry for creating .class files from .java files
28 # This is a target entry that uses the suffix rule syntax:
31 # 'TS' is the suffix of the target file, 'DS' is the suffix of the dependency
32 # file, and 'rule' is the rule for building a target
33 # '$*' is a built-in macro that gets the basename of the current target
34 # Remember that there must be a < tab > before the command line ('rule')
38 $(JC) $(JFLAGS) $*.java
42 # CLASSES is a macro consisting of 4 words (one for each java source file)
50 CLASSES = $(SOURCES:%.java=%.class)
53 # the default make target entry
60 # This target entry uses Suffix Replacement within a macro:
61 # $(name:string1=string2)
62 # In the words in the macro named 'name' replace 'string1' with 'string2'
63 # Below we are replacing the suffix .java of all words in the macro CLASSES
64 # with the .class suffix
67 classes: $(SOURCES:.java=.class)
70 jar cve $(JAR_PKG) $(CLASSES)
73 tar czpf $(TARBALL) $(SOURCES) Makefile
77 # RM is a predefined macro in make (RM = rm -f)