-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
113 lines (98 loc) · 3.91 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#
# Makefile created by Jeff Bassett, with some
# tweaks by Sean Luke
#
# To compile everything but GUI: make
# To delete class files: make clean
# To build the documentation: make docs
# To auto-indent using Emacs: make indent
# To build everything + GUI: make gui
# (requires JFreeChart: www.jfree.org/jfreechart/)
# (requires iText: www.lowagie.com/iText/)
# [also, used here at GMU, you can ignore it...]
# Prepare for distribution: make dist
#
JAVAC = javac ${JAVACFLAGS}
JAVACFLAGS = -target 1.7 ${FLAGS}
FLAGS = -g -Xlint:deprecation
DIRS = \
ec/*.java \
ec/app/fixedpoint/*.java \
ec/breed/*.java \
ec/coevolve/*.java \
ec/de/*.java \
ec/es/*.java \
ec/eval/*.java \
ec/evolve/*.java \
ec/exchange/*.java \
ec/gp/*.java \
ec/gp/breed/*.java \
ec/gp/build/*.java \
ec/gp/koza/*.java \
ec/gp/ge/*.java \
ec/gp/ge/breed/*.java \
ec/multiobjective/*.java \
ec/multiobjective/nsga2/*.java \
ec/multiobjective/spea2/*.java \
ec/pso/*.java \
ec/select/*.java \
ec/simple/*.java \
ec/spatial/*.java \
ec/steadystate/*.java \
ec/util/*.java \
ec/vector/*.java \
ec/vector/breed/*.java \
ec/parsimony/*.java\
ec/rule/*.java \
ec/rule/breed/*.java \
JARS = -cp lib/xfp.jar:lib/scala-library.jar:lib/parser.jar
all: base
base:
@ echo This builds the code except for gui
@ echo For other Makefile options, type: make help
@ echo
${JAVAC} ${JARS} ${DIRS}
gui:
@ echo This builds the base code and the gui code
@ echo -- requires JFreeChart: www.jfree.org/jfreechart/
@ echo -- requires iText: www.lowagie.com/iText/
@ echo
${JAVAC} ${DIRS} ec/display/chart/*.java ec/app/gui/*.java ec/display/*.java ec/display/portrayal/*.java
clean:
find . -name "*.class" -exec rm -f {} \;
find . -name "*.stat" -exec rm -f {} \;
find . -name ".DS_Store" -exec rm -rf {} \;
find . -name "*.java*~" -exec rm -rf {} \;
rm -rf docs/classdocs/*
rm -rf ec/app/moobenchmarks
dist: clean gui indent doc
find . -name "*.stat" -exec rm rf {} \; -print
echo --------------------------
echo Expect some errors here...
echo --------------------------
find . -name ".svn" -exec rm -rf {} \; -print | cat
indent:
@ echo This uses emacs to indent all of the code. To indent with
@ echo "ECJ's default indent style, create a .emacs file in your home"
@ echo "directory, with the line: (setq c-default-style \"whitesmith\")"
@ echo and run make indent. To indent with BSD/Allman style, use
@ echo "the line: (setq c-default-style \"bsd\")"
@ echo
touch ${HOME}/.emacs
find . -name "*.java" -print -exec emacs --batch --load ~/.emacs --eval='(progn (find-file "{}") (mark-whole-buffer) (setq indent-tabs-mode nil) (untabify (point-min) (point-max)) (indent-region (point-min) (point-max) nil) (save-buffer))' \;
doc:
javadoc -classpath . -protected -d docs/classdocs ec ec.breed ec.coevolve ec.de ec.display ec.display.chart ec.display.portrayal ec.es ec.eval ec.evolve ec.exchange ec.gp ec.gp.breed ec.gp.build ec.gp.koza ec.multiobjective ec.multiobjective.spea2 ec.multiobjective.nsga2 ec.parsimony ec.pso ec.rule ec.rule.breed ec.select ec.simple ec.spatial ec.steadystate ec.util ec.vector ec.vector.breed ec.gp.ge
# Print a help message
help:
@ echo ECJ Makefile options
@ echo
@ echo "make Builds the ECJ code using the default compiler"
@ echo "make all (Same thing)"
@ echo "make docs Builds the class documentation, found in docs/classsdocs"
@ echo "make doc (Same thing)"
@ echo "make clean Cleans out all classfiles, checkpoints, and various gunk"
@ echo "make dist Does a make clean, make docs, and make, then deletes SVN dirs"
@ echo "make help Brings up this message!"
@ echo "make indent Uses emacs to re-indent ECJ java files as you'd prefer"
@ echo "make gui Compiles the GUI and charting (requires JFreeChart and iText,"
@ echo " see www.jfree.org/jfreechart/ and www.lowagie.com/iText/"