MakeJeu+CreationComplet
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,56 +1,64 @@
|
||||
# Variables
|
||||
# If the first argument is "jeu"...
|
||||
ifeq (jeu,$(firstword $(MAKECMDGOALS)))
|
||||
# use the rest as arguments for "jeu"
|
||||
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
# ...and turn them into do-nothing targets
|
||||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
### VARIABLES ###
|
||||
|
||||
JC = javac
|
||||
JCFLAGS = -encoding UTF-8 -implicit:none
|
||||
JVM = java
|
||||
SRCDIR = src
|
||||
BINDIR = bin
|
||||
MAINCLASS1 = MainJeu
|
||||
MAINCLASS2 = MainCreation
|
||||
JVMFLAGS =
|
||||
|
||||
SRCDIR = ./src
|
||||
OUTDIR = ./out
|
||||
DOCDIR = ./doc
|
||||
|
||||
### LISTE DES FICHIERS SOURCE ###
|
||||
|
||||
SRCFILES := $(wildcard $(SRCDIR)/*.java)
|
||||
CLASSFILES := $(patsubst $(SRCDIR)/%.java,$(BINDIR)/%.class,$(SRCFILES))
|
||||
|
||||
# Règles de compilation pour les fichiers Java dans le répertoire src
|
||||
$(BINDIR)/%.class: $(SRCDIR)/%.java | $(BINDIR)
|
||||
$(JC) -d $(BINDIR) $<
|
||||
### LISTE DES FICHIERS OBJET ###
|
||||
|
||||
# Crée le répertoire bin s'il n'existe pas
|
||||
$(BINDIR):
|
||||
mkdir -p $(BINDIR)
|
||||
CLASSFILES := $(patsubst $(SRCDIR)/%.java,$(OUTDIR)/%.class,$(SRCFILES))
|
||||
|
||||
# Règle pour exécuter le premier programme
|
||||
runJeu: $(CLASSFILES)
|
||||
$(JVM) -cp $(BINDIR) $(MAINCLASS1)
|
||||
### REGLES ESSENTIELLES ###
|
||||
|
||||
# Règle pour exécuter le deuxième programme
|
||||
runCreation: $(CLASSFILES)
|
||||
$(JVM) -cp $(BINDIR) $(MAINCLASS2)
|
||||
# Compilation de tous les fichiers source
|
||||
$(OUTDIR)/%.class : $(SRCDIR)/%.java | $(OUTDIR)
|
||||
@mkdir -p $(OUTDIR)
|
||||
$(JC) $(JCFLAGS) -cp $(SRCDIR) -d $(OUTDIR) $<
|
||||
|
||||
# Règle pour nettoyer les fichiers compilés
|
||||
# Crée le répertoire de sortie s'il n'existe pas
|
||||
$(OUTDIR):
|
||||
mkdir -p $(OUTDIR)
|
||||
|
||||
# La classe Main dépend de tous les fichiers compilés
|
||||
$(OUTDIR)/MainJeu.class : $(CLASSFILES)
|
||||
|
||||
### REGLES OPTIONNELLES ###
|
||||
|
||||
# Règle pour lancer le programme
|
||||
jeu : $(OUTDIR)/MainJeu.class
|
||||
$(JVM) $(JVMFLAGS) -cp $(OUTDIR) MainJeu $(RUN_ARGS)
|
||||
|
||||
# Nettoyage des fichiers générés
|
||||
clean :
|
||||
rm -rf $(BINDIR)/*
|
||||
-rm -rf $(OUTDIR)
|
||||
-rm -rf $(DOCDIR)
|
||||
|
||||
# Règle pour créer la documentation
|
||||
# Nettoyage et suppression des fichiers générés, y compris la classe Main
|
||||
mrproper : clean
|
||||
|
||||
# Génération de la documentation
|
||||
doc :
|
||||
javadoc -d docs $(SRCDIR)/*.java
|
||||
javadoc -d $(DOCDIR) $(SRCDIR)/*.java
|
||||
|
||||
# Règle pour visualiser la documentation
|
||||
seedoc:
|
||||
firefox docs/index.html &
|
||||
### BUTS FACTICES ###
|
||||
|
||||
# Définir les cibles factices
|
||||
.PHONY: build runJeu runCreation clean doc seedoc
|
||||
|
||||
# Règle par défaut
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
# Règle pour compiler AutomatiqueActionListener avec ses dépendances
|
||||
$(BINDIR)/AutomatiqueActionListener.class: $(SRCDIR)/AutomatiqueActionListener.java $(BINDIR)/GenerateurSudoku.class $(BINDIR)/FenetrePrincipale.class $(BINDIR)/Resolveur.class
|
||||
$(JC) -d $(BINDIR) $<
|
||||
|
||||
# Règle pour compiler FenetrePrincipale avec ses dépendances
|
||||
$(BINDIR)/FenetrePrincipale.class: $(SRCDIR)/FenetrePrincipale.java $(BINDIR)/SaisieGrille.class $(BINDIR)/ReinitialiserActionListener.class
|
||||
$(JC) -d $(BINDIR) $<
|
||||
|
||||
# Règle pour compiler SaisieGrille avec ses dépendances
|
||||
$(BINDIR)/SaisieGrille.class: $(SRCDIR)/SaisieGrille.java $(BINDIR)/CaseMouseListener.class $(BINDIR)/GrillePainter.class
|
||||
$(JC) -d $(BINDIR) $<
|
||||
.PHONY : jeu clean mrproper doc
|
||||
|
||||
### FIN ###
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user