FIprojetAgile2022Groupe3B/projetAgile/Makefile~
2022-10-24 20:32:57 +02:00

138 lines
5.1 KiB
Makefile

JAVAC_OPT = -implicit:none \
-d build -classpath build -sourcepath src
PACKAGE = fr.iutfbleau.projetAgile
PACKAGE_PATH = fr/iutfbleau/projetAgile
#------- Variables ------
View = build/$(PACKAGE_PATH)/View/Pion.class \
build/$(PACKAGE_PATH)/View/Grille.class \
build/$(PACKAGE_PATH)/View/Puissance4Panel.class \
build/$(PACKAGE_PATH)/View/BoutonsMenu.class \
build/$(PACKAGE_PATH)/View/Menu.class
Utils = build/$(PACKAGE_PATH)/Utils/Constants.class \
build/$(PACKAGE_PATH)/Utils/GameStatus.class
Events = build/$(PACKAGE_PATH)/Event/GridChangedListener.class \
build/$(PACKAGE_PATH)/Event/GridEvent.class \
build/$(PACKAGE_PATH)/Event/PlayerEvent.class
Model = build/$(PACKAGE_PATH)/Model/GrilleModel.class
Controller = build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \
build/$(PACKAGE_PATH)/Controller/ModelEventListener.class \
build/$(PACKAGE_PATH)/Controller/ResetGame.class
#BUT PAR DEFAUT
ArgileGames.jar : build/$(PACKAGE_PATH)/Main.class
jar cvfe ArgileGames.jar $(PACKAGE_PATH).Main -C build fr -C res images
#------- Events ------
build/$(PACKAGE_PATH)/Event/PlayerEvent.class : src/$(PACKAGE_PATH)/Event/PlayerEvent.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Event/GridEvent.class : src/$(PACKAGE_PATH)/Event/GridEvent.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Event/GridChangedListener.class : src/$(PACKAGE_PATH)/Event/GridChangedListener.java \
build/$(PACKAGE_PATH)/Event/GridEvent.class \
build/$(PACKAGE_PATH)/Event/PlayerEvent.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class : src/$(PACKAGE_PATH)/Event/AbstractGridInitiater.java \
$(Events)
javac $(JAVAC_OPT) $<
#------- Controleur ------
build/$(PACKAGE_PATH)/Controller/ResetGame.class : src/$(PACKAGE_PATH)/Controller/ResetGame.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class : src/$(PACKAGE_PATH)/Controller/GrilleMouseListener.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Controller/ModelEventListener.class : src/$(PACKAGE_PATH)/Controller/ModelEventListener.java \
build/$(PACKAGE_PATH)/Event/GridChangedListener.class \
build/$(PACKAGE_PATH)/View/Grille.class \
$(Event)
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class : src/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.java \
build/$(PACKAGE_PATH)/View/BoutonsMenu.class \
build/$(PACKAGE_PATH)/Utils/Constants.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Controller/Puissance4Controller.class : src/$(PACKAGE_PATH)/Controller/Puissance4Controller.java \
build/$(PACKAGE_PATH)/Model/GrilleModel.class \
build/$(PACKAGE_PATH)/View/Grille.class \
build/$(PACKAGE_PATH)/Utils/GameStatus.class \
build/$(PACKAGE_PATH)/View/Puissance4Panel.class \
$(Controller)
javac $(JAVAC_OPT) $<
#------- Modele ------
build/$(PACKAGE_PATH)/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Model/GrilleModel.java \
build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class \
$(Utils)
javac $(JAVAC_OPT) $<
#------- Utils ------
build/$(PACKAGE_PATH)/Utils/Constants.class : src/$(PACKAGE_PATH)/Utils/Constants.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Utils/GameStatus.class : src/$(PACKAGE_PATH)/Utils/GameStatus.java
javac $(JAVAC_OPT) $<
#------- Vue ------
build/$(PACKAGE_PATH)/View/Pion.class : src/$(PACKAGE_PATH)/View/Pion.java \
build/$(PACKAGE_PATH)/Utils/Constants.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/View/Grille.class : src/$(PACKAGE_PATH)/View/Grille.java \
build/$(PACKAGE_PATH)/View/Pion.class \
build/$(PACKAGE_PATH)/Utils/Constants.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/View/Puissance4Panel.class : src/$(PACKAGE_PATH)/View/Puissance4Panel.java \
build/$(PACKAGE_PATH)/View/Pion.class \
build/$(PACKAGE_PATH)/View/Grille.class \
build/$(PACKAGE_PATH)/Utils/Constants.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/View/BoutonsMenu.class : src/$(PACKAGE_PATH)/View/BoutonsMenu.java
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/View/Menu.class : src/$(PACKAGE_PATH)/View/Menu.java \
build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class \
build/$(PACKAGE_PATH)/View/BoutonsMenu.class \
build/$(PACKAGE_PATH)/Utils/Constants.class
javac $(JAVAC_OPT) $<
build/$(PACKAGE_PATH)/Main.class : src/$(PACKAGE_PATH)/Main.java \
build/$(PACKAGE_PATH)/View/Menu.class \
build/$(PACKAGE_PATH)/Controller/Puissance4Controller.class \
build/$(PACKAGE_PATH)/View/Grille.class \
build/$(PACKAGE_PATH)/Model/GrilleModel.class
javac $(JAVAC_OPT) $<
# BUT FACTICES:
.PHONY: clear doc run
doc :
javadoc -d doc src/$(PACKAGE_PATH)/View/*.java src/$(PACKAGE_PATH)/Controller/*.java src/$(PACKAGE_PATH)/Utils/*.java src/$(PACKAGE_PATH)/Model/*.java src/$(PACKAGE_PATH)/Event/*.java
run: ArgileGames.jar
java -jar ArgileGames.jar
clear :
rm -rf build/*