makefilecreation
This commit is contained in:
parent
56b1837f4f
commit
fb9d78c242
BIN
Grilles/Grilletest.gri
Normal file
BIN
Grilles/Grilletest.gri
Normal file
Binary file not shown.
BIN
Grilles/TestGrille2
Normal file
BIN
Grilles/TestGrille2
Normal file
Binary file not shown.
21
Makefile
21
Makefile
@ -6,6 +6,14 @@ ifeq (jeu,$(firstword $(MAKECMDGOALS)))
|
||||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
# If the first argument is "creation"...
|
||||
ifeq (creation,$(firstword $(MAKECMDGOALS)))
|
||||
# use the rest as arguments for "creation"
|
||||
CREATION_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
# ...and turn them into do-nothing targets
|
||||
$(eval $(CREATION_ARGS):;@:)
|
||||
endif
|
||||
|
||||
### VARIABLES ###
|
||||
|
||||
JC = javac
|
||||
@ -36,15 +44,22 @@ $(OUTDIR)/%.class : $(SRCDIR)/%.java | $(OUTDIR)
|
||||
$(OUTDIR):
|
||||
mkdir -p $(OUTDIR)
|
||||
|
||||
# La classe Main dépend de tous les fichiers compilés
|
||||
# La classe MainJeu dépend de tous les fichiers compilés
|
||||
$(OUTDIR)/MainJeu.class : $(CLASSFILES)
|
||||
|
||||
# La classe MainCreation dépend de tous les fichiers compilés
|
||||
$(OUTDIR)/MainCreation.class : $(CLASSFILES)
|
||||
|
||||
### REGLES OPTIONNELLES ###
|
||||
|
||||
# Règle pour lancer le programme
|
||||
# Règle pour lancer le programme MainJeu
|
||||
jeu : $(OUTDIR)/MainJeu.class
|
||||
$(JVM) $(JVMFLAGS) -cp $(OUTDIR) MainJeu $(RUN_ARGS)
|
||||
|
||||
# Règle pour lancer le programme MainCreation
|
||||
creation : $(OUTDIR)/MainCreation.class
|
||||
$(JVM) $(JVMFLAGS) -cp $(OUTDIR) MainCreation $(CREATION_ARGS)
|
||||
|
||||
# Nettoyage des fichiers générés
|
||||
clean :
|
||||
-rm -rf $(OUTDIR)
|
||||
@ -59,6 +74,6 @@ doc :
|
||||
|
||||
### BUTS FACTICES ###
|
||||
|
||||
.PHONY : jeu clean mrproper doc
|
||||
.PHONY : jeu creation clean mrproper doc
|
||||
|
||||
### FIN ###
|
||||
|
Loading…
Reference in New Issue
Block a user