Correction du makefile

This commit is contained in:
Marco ORFAO 2024-05-04 19:39:22 +02:00
parent ff895c17c5
commit 2edf4581fe
2 changed files with 44 additions and 1 deletions

View File

@ -32,6 +32,9 @@ GSMenuController.class : ${SRCDIR}/GSMenuController.java GSMenu.class Window.cla
GSGrid.class GSCase.class GSCaseMouseListener.class : ${SRCDIR}/GSGrid.java GSMenu.class GSGrid.class GSCase.class GSCaseMouseListener.class : ${SRCDIR}/GSGrid.java GSMenu.class
${JC} ${JCFLAGS} -cp $(SRCDIR) ${SRCDIR}/GSGrid.java ${SRCDIR}/GSCase.java ${SRCDIR}/GSCaseMouseListener.java -d $(OUTDIR) ${JC} ${JCFLAGS} -cp $(SRCDIR) ${SRCDIR}/GSGrid.java ${SRCDIR}/GSCase.java ${SRCDIR}/GSCaseMouseListener.java -d $(OUTDIR)
GSPlay.class GSPlayController.class : ${SRCDIR}/GSPlay.java GSGrid.class Button.class Window.class
${JC} ${JCFLAGS} -cp $(SRCDIR) ${SRCDIR}/GSPlay.java ${SRCDIR}/GSPlayController.java -d $(OUTDIR)
GSSolver.class : ${SRCDIR}/GSSolver.java GSGrid.class Window.class GSSolver.class : ${SRCDIR}/GSSolver.java GSGrid.class Window.class
${JC} ${JCFLAGS} -cp $(SRCDIR) ${SRCDIR}/GSSolver.java -d $(OUTDIR) ${JC} ${JCFLAGS} -cp $(SRCDIR) ${SRCDIR}/GSSolver.java -d $(OUTDIR)
@ -125,4 +128,4 @@ default:
.PHONY : run clean doc .PHONY : run clean doc
### FIN ### ### FIN ###

40
Makefile-V2 Normal file
View File

@ -0,0 +1,40 @@
JC := javac
JCFLAGS := -encoding UTF-8 -implicit:none
JVM := java
JVMFLAGS :=
SRCDIR := ./src
OUTDIR := ./build
DOCDIR := ./doc
SRC := $(wildcard $(SRCDIR)/*.java)
OFILES := $(SRC:$(SRCDIR)/%.java=$(OUTDIR)/%.class)
### REGLES ESSENTIELLES ###
$(OUTDIR)/%.class : $(SRCDIR)/%.java
@mkdir -p $(@D)
${JC} ${JCFLAGS} -cp $(SRCDIR) -d $(OUTDIR) $<
### REGLES OPTIONNELLES ###
all:
GridMaker : $(OFILES)
${JVM} ${JVMFLAGS} -cp $(OUTDIR) GridMaker $(RUN_ARGS)
GridSolver : $(OFILES)
${JVM} ${JVMFLAGS} -cp $(OUTDIR) GridSolver $(RUN_ARGS)
clean :
-rm -rf $(OUTDIR)
-rm -rf $(DOCDIR)
doc :
javadoc -d $(DOCDIR) $(SRC)
### BUTS FACTICES ###
.PHONY: all GridMaker GridSolver clean doc
### FIN ###