3 |
|
|
4 |
|
# For help type: make help |
5 |
|
|
6 |
+ |
|
7 |
|
# Defining Filenames |
8 |
|
|
9 |
< |
CORE = Core.class ConfiguratorServant.class ConfigurationServant.class\ |
10 |
< |
ScreenLoggerServant.class FileLoggerServant.class |
9 |
> |
CORE = Core.class ConfigurationManagerServant.class ConfigurationServant.class\ |
10 |
> |
LoggerServant.class LoggerImpl.class ScreenLogger.class\ |
11 |
> |
FileLogger.class MultiLogger.class SimpleGUILogger.class\ |
12 |
> |
CircularIncludeException.class |
13 |
|
|
11 |
– |
COREDEPS = Core.java ConfiguratorServant.java ConfigurationServant.java\ |
12 |
– |
ScreenLoggerServant.java FileLoggerServant.java |
13 |
– |
|
14 |
|
SAMPLE = SampleConfigObtainer.class |
15 |
|
|
16 |
– |
SAMPLEDEPS = SampleConfigObtainer.java |
17 |
– |
|
16 |
|
PACKAGE = Core.jar |
17 |
|
|
18 |
< |
# Defining "shortcuts" |
18 |
> |
IDL = ../.madeidl |
19 |
> |
IDLFILES = ../uk |
20 |
> |
IDLMAKE = cd .. && $(MAKE) idl |
21 |
|
|
22 |
< |
core : $(CORE) |
23 |
< |
sample : $(SAMPLE) |
22 |
> |
# Defining "shortcuts" for building |
23 |
> |
|
24 |
> |
core : $(IDL) $(CORE) |
25 |
> |
sample : $(IDL) $(SAMPLE) |
26 |
|
all : core sample |
27 |
|
package : $(PACKAGE) |
28 |
|
|
29 |
< |
# What is actually done |
29 |
> |
clean : |
30 |
> |
rm -f $(CORE) $(SAMPLE) $(PACKAGE) |
31 |
|
|
32 |
< |
$(CORE) : $(COREDEPS) |
33 |
< |
javac $(COREDEPS) |
32 |
> |
distclean : clean |
33 |
> |
rm -Rf $(IDLFILES) |
34 |
> |
rm -f $(IDL) |
35 |
|
|
36 |
< |
$(SAMPLE) : $(SAMPLEDEPS) |
37 |
< |
javac $(SAMPLEDEPS) |
36 |
> |
run : core |
37 |
> |
java Core |
38 |
|
|
39 |
< |
$(PACKAGE) : $(CORE) |
39 |
> |
update : |
40 |
> |
cvs -q -d /usr/local/proj/co600_10/cvs update |
41 |
> |
|
42 |
> |
# Dependencies, and building |
43 |
> |
|
44 |
> |
#clever catchall to build any .class file from a .java file |
45 |
> |
%.class : %.java |
46 |
> |
javac $< |
47 |
> |
|
48 |
> |
$(PACKAGE) : core |
49 |
|
echo "Main-Class: Core" > MANIFEST_CORE_TMP |
50 |
|
jar -cmf MANIFEST_CORE_TMP $(PACKAGE) $(CORE) |
51 |
|
rm -f MANIFEST_CORE_TMP |
52 |
|
@echo "----------------------------" |
53 |
|
@echo "to run: java -jar $(PACKAGE)" |
54 |
|
@echo "----------------------------" |
55 |
+ |
@echo "WARNING: Need to sort Classpath" |
56 |
|
|
57 |
< |
clean : |
58 |
< |
rm -f $(CORE) $(SAMPLE) $(PACKAGE) |
57 |
> |
$(IDL) : ../iscream.idl |
58 |
> |
$(IDLMAKE) |
59 |
|
|
46 |
– |
run : $(CORE) |
47 |
– |
java Core |
60 |
|
|
61 |
|
# and the help :) |
62 |
|
|
63 |
|
help : |
64 |
|
@echo "Makefile usage [default: core]" |
65 |
|
@echo |
66 |
< |
@echo "make run - runs the core programs" |
66 |
> |
@echo "make run - runs the core programs" |
67 |
|
@echo |
68 |
< |
@echo "make core - builds the core programs" |
69 |
< |
@echo "make sample - builds the sample program" |
70 |
< |
@echo "make all - builds both the core and sample" |
68 |
> |
@echo "make core - builds the core programs" |
69 |
> |
@echo "make sample - builds the sample program" |
70 |
> |
@echo "make all - builds both the core and sample" |
71 |
|
@echo |
72 |
< |
@echo "make package - packages the core programs into a JAR" |
72 |
> |
@echo "make package - packages the core programs into a JAR" |
73 |
|
@echo |
74 |
< |
@echo "make clean - removes all the compiled files" |
74 |
> |
@echo "make clean - removes all the compiled files" |
75 |
> |
@echo "make distclean - removes all the compiled files, and the IDL created files" |
76 |
|
@echo |