-all: mate Test.class
- ./mate Test.class
+JAVAC = javac
+JAVA_FILES := $(wildcard tests/*.java)
+CLASS_FILES := $(JAVA_FILES:.java=.class)
+
+all: mate $(CLASS_FILES)
+ ./mate tests/Test.class
%.class: %.java
javac $<
ghc --make -Wall -O2 $^ -o $@
clean:
- rm -f *.hi *.o mate
+ rm -f *.hi *.o mate src/*.class
+++ /dev/null
-public class Test {
- private static int foo;
- private static int bar;
-
- public static void main(String [] args) {
- foo = 0x42;
- bar = 2 * foo;
- }
-}
--- /dev/null
+public class Test {
+ private static int foo;
+ private static int bar;
+
+ public static void main(String [] args) {
+ foo = 0x42;
+ bar = 2 * foo;
+ }
+}