1 |
tdb |
1.1 |
# Makefile for CORE |
2 |
|
|
# $Id$ |
3 |
|
|
|
4 |
|
|
# For help type: make help |
5 |
|
|
|
6 |
|
|
# Defining Filenames |
7 |
|
|
|
8 |
|
|
CORE = Core.class ConfiguratorServant.class ConfigurationServant.class\ |
9 |
|
|
ScreenLoggerServant.class FileLoggerServant.class |
10 |
|
|
|
11 |
|
|
COREDEPS = Core.java ConfiguratorServant.java ConfigurationServant.java\ |
12 |
|
|
ScreenLoggerServant.java FileLoggerServant.java |
13 |
|
|
|
14 |
|
|
SAMPLE = SampleConfigObtainer.class |
15 |
|
|
|
16 |
|
|
SAMPLEDEPS = SampleConfigObtainer.java |
17 |
|
|
|
18 |
|
|
PACKAGE = Core.jar |
19 |
|
|
|
20 |
|
|
# Defining "shortcuts" |
21 |
|
|
|
22 |
|
|
core : $(CORE) |
23 |
|
|
sample : $(SAMPLE) |
24 |
|
|
all : core sample |
25 |
|
|
package : $(PACKAGE) |
26 |
|
|
|
27 |
|
|
# What is actually done |
28 |
|
|
|
29 |
|
|
$(CORE) : $(COREDEPS) |
30 |
|
|
javac $(COREDEPS) |
31 |
|
|
|
32 |
|
|
$(SAMPLE) : $(SAMPLEDEPS) |
33 |
|
|
javac $(SAMPLEDEPS) |
34 |
|
|
|
35 |
|
|
$(PACKAGE) : $(CORE) |
36 |
|
|
echo "Main-Class: Core" > MANIFEST_CORE_TMP |
37 |
|
|
jar -cmf MANIFEST_CORE_TMP $(PACKAGE) $(CORE) |
38 |
|
|
rm -f MANIFEST_CORE_TMP |
39 |
|
|
@echo "----------------------------" |
40 |
|
|
@echo "to run: java -jar $(PACKAGE)" |
41 |
|
|
@echo "----------------------------" |
42 |
|
|
|
43 |
|
|
clean : |
44 |
|
|
rm -f $(CORE) $(SAMPLE) $(PACKAGE) |
45 |
|
|
|
46 |
|
|
run : $(CORE) |
47 |
|
|
java Core |
48 |
|
|
|
49 |
|
|
# and the help :) |
50 |
|
|
|
51 |
|
|
help : |
52 |
|
|
@echo "Makefile usage [default: core]" |
53 |
|
|
@echo |
54 |
|
|
@echo "make run - runs the core programs" |
55 |
|
|
@echo |
56 |
|
|
@echo "make core - builds the core programs" |
57 |
|
|
@echo "make sample - builds the sample program" |
58 |
|
|
@echo "make all - builds both the core and sample" |
59 |
|
|
@echo |
60 |
|
|
@echo "make package - packages the core programs into a JAR" |
61 |
|
|
@echo |
62 |
|
|
@echo "make clean - removes all the compiled files" |
63 |
|
|
@echo |