Ajout du Makefile
This commit is contained in:
parent
4f326ef2d1
commit
bb6afe1c3e
@ -2,7 +2,6 @@
|
|||||||
<configuration default="false" name="Labyrinthe" type="Application" factoryName="Application">
|
<configuration default="false" name="Labyrinthe" type="Application" factoryName="Application">
|
||||||
<option name="MAIN_CLASS_NAME" value="Main" />
|
<option name="MAIN_CLASS_NAME" value="Main" />
|
||||||
<module name="SAE21_2022" />
|
<module name="SAE21_2022" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
|
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
|
34
Makefile
Normal file
34
Makefile
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
### VARIABLES ###
|
||||||
|
|
||||||
|
JC = javac
|
||||||
|
JCFLAGS = -encoding UTF-8 -implicit:none
|
||||||
|
JVM = java
|
||||||
|
JVMFLAGS =
|
||||||
|
|
||||||
|
SRCDIR = ./src
|
||||||
|
OUTDIR = ./out
|
||||||
|
OFILES = $(subst src/,out/,$(subst .java,.class,$(shell find $(SRCDIR)/ -name *.java)))
|
||||||
|
|
||||||
|
### REGLES ESSENTIELLES ###
|
||||||
|
|
||||||
|
$(OUTDIR)/%.class : $(SRCDIR)/%.java
|
||||||
|
@mkdir -p $(@D)
|
||||||
|
${JC} ${JCFLAGS} -cp $(SRCDIR) -d $(@D) $<
|
||||||
|
|
||||||
|
$(OUTDIR)/Main.class : $(OFILES)
|
||||||
|
|
||||||
|
### REGLES OPTIONNELLES ###
|
||||||
|
|
||||||
|
run : $(OUTDIR)/Main.class
|
||||||
|
${JVM} ${JVMFLAGS} -cp $(OUTDIR) Main
|
||||||
|
|
||||||
|
clean :
|
||||||
|
-rm -rf $(OUTDIR)
|
||||||
|
|
||||||
|
mrproper : clean $(OUTDIR)/Main.class
|
||||||
|
|
||||||
|
### BUTS FACTICES ###
|
||||||
|
|
||||||
|
.PHONY : run clean mrproper
|
||||||
|
|
||||||
|
### FIN ###
|
@ -118,6 +118,6 @@ public class HomeView extends JPanel {
|
|||||||
@Override
|
@Override
|
||||||
public void paintComponent(Graphics g) {
|
public void paintComponent(Graphics g) {
|
||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
g.drawImage(new ImageIcon("background.jpg").getImage(), 0, 0, getWidth(), getHeight(), null);
|
g.drawImage(new ImageIcon("./src/background.jpg").getImage(), 0, 0, getWidth(), getHeight(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user