+TEST_JAVA_FILES := $(wildcard tests/*.java)
+TEST_CLASS_FILES := $(TEST_JAVA_FILES:.java=.test)
+HS_FILES := $(wildcard Mate/*.hs)
+HS_BOOT := $(wildcard Mate/*.hs-boot)
+BUILD := build
+B_RELEASE := $(BUILD)/release
+B_STATIC := $(BUILD)/static
+B_DEBUG := $(BUILD)/debug
+PACKAGES_ := bytestring harpy hs-java plugins
+PACKAGES := $(addprefix -package ,$(PACKAGES_))
+
+
+GHC_CPP := -DARCH_X86
+
+GHC_OPT = -I. -O0 -Wall -fno-warn-unused-do-bind -fwarn-tabs
+# TODO: define this in cabal... (see cpu package @ hackage)
+# see *.gdb target. also useful for profiling (-p at call)
+GHC_OPT += -rtsopts # -prof -auto-all
+GHC_OPT += $(GHC_CPP)
+
+# dunno anymore? some linker stuff regarding GHCi
+GHC_LD := -optl-Xlinker -optl-x
+
+
+.PHONY: all tests clean ghci hlint
+
+all: mate
+
+%: %.class mate
+ ./mate $(basename $<)