makefile
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.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,56 @@
|
||||
# Variables
|
||||
JC = javac
|
||||
JVM = java
|
||||
SRCDIR = src
|
||||
BINDIR = bin
|
||||
MAINCLASS1 = MainJeu
|
||||
MAINCLASS2 = MainCreation
|
||||
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) $<
|
||||
|
||||
# Crée le répertoire bin s'il n'existe pas
|
||||
$(BINDIR):
|
||||
mkdir -p $(BINDIR)
|
||||
|
||||
# Règle pour exécuter le premier programme
|
||||
runJeu: $(CLASSFILES)
|
||||
$(JVM) -cp $(BINDIR) $(MAINCLASS1)
|
||||
|
||||
# Règle pour exécuter le deuxième programme
|
||||
runCreation: $(CLASSFILES)
|
||||
$(JVM) -cp $(BINDIR) $(MAINCLASS2)
|
||||
|
||||
# Règle pour nettoyer les fichiers compilés
|
||||
clean:
|
||||
rm -rf $(BINDIR)/*
|
||||
|
||||
# Règle pour créer la documentation
|
||||
doc:
|
||||
javadoc -d docs $(SRCDIR)/*.java
|
||||
|
||||
# Règle pour visualiser la documentation
|
||||
seedoc:
|
||||
firefox docs/index.html &
|
||||
|
||||
# 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) $<
|
||||
|
||||
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.
@@ -1,5 +1,5 @@
|
||||
|
||||
public class Main {
|
||||
public class MainJeu {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Le programme Main a démarré.");
|
||||
|
||||
Reference in New Issue
Block a user