Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build infrastructure for independent project.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 8 Apr 2016 08:09:14 +0000 (10:09 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 8 Apr 2016 08:22:25 +0000 (10:22 +0200)
.gitignore [new file with mode: 0644]
Makefile
Makefile.generic [new file with mode: 0644]
MoreEx/Makefile

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..435d79e
--- /dev/null
@@ -0,0 +1,9 @@
+*~
+
+DrawingWindow*.class
+Exemple[123].class
+Hello.class
+Test.class
+MoreEx/*.class
+MoreEx/DrawingWindow.java
+html/
index a3060bf..5fff79b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,3 @@
-include ../subdefs.mk
-
 DEST = $(HOME)/public_html/enseignement/Permanent/AlgoProg/tp/graph
 
 SRC = DrawingWindow.java
@@ -9,8 +7,8 @@ SRC_CLASS = $(SRC:%.java=%.class)
 EXAMPLES_CLASS = $(EXAMPLES:%.java=%.class)
 
 all: html/index.html
-       $(MAKE) -f ../Makefile.generic $(SRC_CLASS) $(EXAMPLES_CLASS)
-       $(MAKE) -f ../Makefile.generic Test.class
+       $(MAKE) -f Makefile.generic $(SRC_CLASS) $(EXAMPLES_CLASS)
+       $(MAKE) -f Makefile.generic Test.class
 
 html/index.html: $(SRC) overview.html
        $(RM) -r html
diff --git a/Makefile.generic b/Makefile.generic
new file mode 100644 (file)
index 0000000..4c85af0
--- /dev/null
@@ -0,0 +1,20 @@
+JAVAC = javac
+
+JAVACFLAGS = -Xlint
+
+SRC.java = $(wildcard *.java)
+
+TARGETS = $(SRC.java:%.java=%.class)
+
+%.class: %.java
+       $(JAVAC) $(JAVACFLAGS) $<
+
+.PHONY: all clean realclean
+
+all: $(TARGETS)
+
+clean:
+       $(RM) $(TARGETS)
+
+realclean: clean
+       $(RM) *~ \#*\#
index 39f111a..146d18c 100644 (file)
@@ -5,7 +5,7 @@ CLASS = $(SRC:%.java=%.class)
 .PHONY: all clean
 
 all: DrawingWindow.java
-       $(MAKE) -f ../../Makefile.generic $(CLASS)
+       $(MAKE) -f ../Makefile.generic $(CLASS)
 
 clean:
        $(RM) *~