-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
120 lines (96 loc) · 4.42 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
114
115
116
117
118
119
120
# Ensimag 2A POO - TP 2018/19
# ============================
#
# Ce Makefile permet de compiler le test de l'ihm en ligne de commande.
# Alternative (recommandee?): utiliser un IDE (eclipse, netbeans, ...)
# Le but est ici d'illustrer les notions de "classpath", a vous de l'adapter
# a votre projet.
#
# Organisation:
# 1) Les sources (*.java) se trouvent dans le repertoire src
# Les classes d'un package toto sont dans src/toto
# Les classes du package par defaut sont dans src
#
# 2) Les bytecodes (*.class) se trouvent dans le repertoire bin
# La hierarchie des sources (par package) est conservee.
# L'archive bin/gui.jar contient les classes de l'interface graphique
#
# Compilation:
# Options de javac:
# -d : repertoire dans lequel sont places les .class compiles
# -classpath : repertoire dans lequel sont cherches les .class deja compiles
# -sourcepath : repertoire dans lequel sont cherches les .java (dependances)
all: Simulation Robot Carte Strategie Test
Exception:
javac -d bin -classpath bin -sourcepath src src/Exception/*.java
io:
javac -d bin -classpath bin -sourcepath src src/io/*.java
Simulation:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Simulation/*.java
Robot:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Robot/*.java
Carte:
javac -d bin -classpath bin -sourcepath src src/Carte/*.java
Strategie:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Strategie/*.java
Events:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Events/*.java
Test:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/*.java
testInvader:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestInvader.java
testLecture:
javac -d bin -classpath bin -sourcepath src src/Test/TestLecteurDonnees.java
testRobots:
javac -d bin -classpath bin -sourcepath src src/Test/TestRobots.java
testChemin:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestChemin.java
testSimulateur:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestSimulation.java
testSimulateurPropagation:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestSimulationAvecPropagation.java
testSimulateurKO:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestSimulateurKO.java
testSimulateurOK:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestSimulateurOK.java
testSimulateurBonus:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestSimulateurBonus.java
testCarte:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestCarte.java
testDijkstra:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestDijkstra.java
testStrategie:
javac -d bin -classpath bin:bin/gui.jar -sourcepath src src/Test/TestStrategieInteractif.java
# Execution:
# on peut taper directement la ligne de commande :
# > java -classpath bin:bin/gui.jar TestInvader
# ou bien lancer l'execution en passant par ce Makefile:
# > make exeInvader
exeCarte: testCarte
java -classpath bin:bin/gui.jar Test/TestCarte cartes/carteSujet.map
exeDijkstra: testDijkstra
java -classpath bin:bin/gui.jar Test/TestDijkstra cartes/mushroomOfHell-20x20.map
exeChemin: testChemin
java -classpath bin:bin/gui.jar Test/TestChemin cartes/carteChenilles.map
exeSimulateur: testSimulateur
java -classpath bin:bin/gui.jar Test/TestSimulation cartes/carteSimulation.map
exeSimulateurPropagation: testSimulateurPropagation
java -classpath bin:bin/gui.jar Test/TestSimulationAvecPropagation cartes/carteSimulation.map
exeSimulateurKO: testSimulateurKO
java -classpath bin:bin/gui.jar Test/TestSimulateurKO cartes/carteSimulation.map
exeSimulateurOK: testSimulateurOK
java -classpath bin:bin/gui.jar Test/TestSimulateurOK cartes/carteSujet.map
exeSimulateurBonus: testSimulateurBonus
java -classpath bin:bin/gui.jar Test/TestSimulateurBonus cartes/carteSimulation.map
exeInvader: testInvader
java -classpath bin:bin/gui.jar Test/TestInvader
exeLecture:
java -classpath src:bin Test/TestLecteurDonnees cartes/carteSujet.map
exeRobots: testRobots
java -classpath src:bin Test/TestRobots cartes/cartePattes.map
exeStrategie: testStrategie
java -classpath bin:bin/gui.jar Test/TestStrategieInteractif cartes/carteTestImpossible.map
exeOptimisationB: testSimulateur
java -classpath bin:bin/gui.jar Test/TestSimulation cartes/carteTestOptimisationB.map
clean:
find bin/ -not \( -name 'gui.jar' -or -name 'bin' \) -delete