1 |
< |
# Makefile for CORE |
1 |
> |
# Makefile for uk.ac.ukc.iscream.core |
2 |
|
# $Id$ |
3 |
|
|
4 |
< |
# For help type: make help |
4 |
> |
# Config Include |
5 |
> |
include ../../../../../Config.inc |
6 |
|
|
7 |
+ |
# Defining Filenames (these will all be built) |
8 |
|
|
9 |
< |
# Defining Filenames |
9 |
> |
JAVA = CircularIncludeException.java ConfigurationManagerServant.java\ |
10 |
> |
ConfigurationServant.java Core.java\ |
11 |
> |
LoggerImpl.java LoggerServant.java |
12 |
|
|
13 |
< |
CORE = Core.class ConfiguratorServant.class ConfigurationServant.class\ |
14 |
< |
ScreenLoggerServant.class FileLoggerServant.class |
13 |
> |
# Build Rules |
14 |
> |
all : core loggers |
15 |
|
|
16 |
< |
SAMPLE = SampleConfigObtainer.class |
16 |
> |
core : DOBUILD |
17 |
|
|
18 |
< |
PACKAGE = Core.jar |
18 |
> |
loggers : mkloggers |
19 |
> |
mkloggers : |
20 |
> |
cd loggers && $(MAKE) all |
21 |
|
|
22 |
+ |
clean : DOCLEAN |
23 |
+ |
cd loggers && $(MAKE) clean |
24 |
|
|
25 |
< |
# Defining "shortcuts" for building |
26 |
< |
|
19 |
< |
core : $(CORE) |
20 |
< |
sample : $(SAMPLE) |
21 |
< |
all : core sample |
22 |
< |
package : $(PACKAGE) |
23 |
< |
|
24 |
< |
clean : |
25 |
< |
rm -f $(CORE) $(SAMPLE) $(PACKAGE) |
26 |
< |
|
27 |
< |
run : $(CORE) |
28 |
< |
java Core |
29 |
< |
|
30 |
< |
|
31 |
< |
# Dependencies, and building |
32 |
< |
|
33 |
< |
#clever catchall to build any .class file from a .java file |
34 |
< |
%.class : %.java |
35 |
< |
javac $< |
36 |
< |
|
37 |
< |
$(PACKAGE) : $(CORE) |
38 |
< |
echo "Main-Class: Core" > MANIFEST_CORE_TMP |
39 |
< |
jar -cmf MANIFEST_CORE_TMP $(PACKAGE) $(CORE) |
40 |
< |
rm -f MANIFEST_CORE_TMP |
41 |
< |
@echo "----------------------------" |
42 |
< |
@echo "to run: java -jar $(PACKAGE)" |
43 |
< |
@echo "----------------------------" |
44 |
< |
@echo "WARNING: Need to sort Classpath" |
45 |
< |
|
46 |
< |
|
47 |
< |
# and the help :) |
48 |
< |
|
49 |
< |
help : |
50 |
< |
@echo "Makefile usage [default: core]" |
51 |
< |
@echo |
52 |
< |
@echo "make run - runs the core programs" |
53 |
< |
@echo |
54 |
< |
@echo "make core - builds the core programs" |
55 |
< |
@echo "make sample - builds the sample program" |
56 |
< |
@echo "make all - builds both the core and sample" |
57 |
< |
@echo |
58 |
< |
@echo "make package - packages the core programs into a JAR" |
59 |
< |
@echo |
60 |
< |
@echo "make clean - removes all the compiled files" |
61 |
< |
@echo |
25 |
> |
# Main Include |
26 |
> |
include $(MKINC) |