Makefile to compile (still no jar file, WIP)
authorNiki Roo <roo.niki@gmail.com>
Thu, 24 Mar 2016 13:03:51 +0000 (14:03 +0100)
committerNiki Roo <roo.niki@gmail.com>
Thu, 24 Mar 2016 13:03:51 +0000 (14:03 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..68b1b0d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+# default target: create the jar file
+ALL: jar
+
+# always re-generate the files list
+.PHONY: classes files 5 6 7 jar
+
+jar: classes
+       echo TODO: jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar
+       cp jvcard-`grep "APPLICATION_VERSION" src/be/nikiroo/jvcard/launcher/Main.java | cut -d'"' -f2`.jar jvcard.jar
+
+# Default java version: 1.5
+classes: 5
+
+5: lanterna files
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 5 @files -d bin/
+
+6: lanterna files
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 6 @files -d bin/
+
+7: lanterna files
+       javac -cp bin/ -encoding UTF-8 -Xlint -source 7 @files -d bin/
+
+files:
+       find src/be/ -name '*.java' > files
+
+lanterna:
+       find src/com/ -name '*.java' > lanterna
+       javac -encoding UTF-8 -source 5 @lanterna -d bin/ || rm lanterna
+       test -e lanterna
+