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