Removal of interfaces used by the packetcable-consumer bundle that has neither been...
[packetcable.git] / packetcable-driver / Makefile
1 # define compiler and compiler flag variables
2
3 JFLAGS = -g
4 JC = javac
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) 
10 JAR_PKG = Test.jar
11
12
13 #
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
21 #
22
23 .SUFFIXES: .java .class
24
25
26 #
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:
29 #       DSTS:
30 #               rule
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') 
35 #
36
37 .java.class:
38         $(JC) $(JFLAGS) $*.java
39
40
41 #
42 # CLASSES is a macro consisting of 4 words (one for each java source file)
43 #
44
45 SOURCES = \
46         Main.java \
47         Test.java 
48
49
50 CLASSES = $(SOURCES:%.java=%.class)
51
52 #
53 # the default make target entry
54 #
55
56 default: classes 
57
58
59 #
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
65 #
66
67 classes: $(SOURCES:.java=.class)
68
69 jar:
70         jar cve $(JAR_PKG) $(CLASSES)
71
72 tar:
73         tar czpf $(TARBALL) $(SOURCES) Makefile
74
75
76 #
77 # RM is a predefined macro in make (RM = rm -f)
78 #
79
80 clean:
81         $(RM) *.class
82