+ifeq ($(enable_external_effects),yes)
+LDFLAGS += -lxml2
+endif
+
+ifeq ($(disable_libiberty),yes)
+LDFLAGS += -liberty
+endif
+
+
+FIRM_HEADERS=$(notdir $(FIRM_PATH_HEADERS))
+MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER)))
+MEMBERS += $(IMPL_MEMBERS)
+
+# How to pass function pointers? Therefore removed.
+# irgwalk.h typewalk.h
+
+# How to pass function pointers? Or how to obtain them?
+# Irgwalk.m Typewalk.m
+#
+FIRM_PATH_HEADERS=common/firm_types.h common/firm.h common/firm_common.h \
+ ident/ident.h tv/tv.h \
+ tr/type.h tr/entity.h tr/type_or_entity.h tr/tpop.h tr/mangle.h \
+ tr/type_identify.h \
+ ir/irprog.h ir/irgraph.h ir/irnode.h ir/irmode.h ir/irop.h \
+ ir/ircons.h ir/ircgcons.h ir/irflag.h ir/irvrfy.h ir/irdump.h \
+ ir/iropt.h ir/irgopt.h ir/ircgopt.h \
+ ana/irouts.h ana/irdom.h ana/irloop.h ana/cgana.h \
+ ir/irgmod.h tr/typegmod.h opt/tailrec.h arch/archop.h \
+ ana/irextbb.h
+
+FIRM_SOURCE_DIR_HEADERS=$(addprefix $(SOURCE_DIR)/,$(FIRM_HEADERS))
+
+# hand implemented members
+IMPL_MEMBERS = Dbginfo.m
+
+ifeq ($(enable_heapanal),yes)
+IMPL_MEMBERS += Heapanal.m
+endif
+
+# The directory containing crecoder.jar and, for now,
+# remove_cpp_comands.perl
+FIRM_JNI_TOOLS_DIR=$(top_srcdir)/tools
+
+WORK_DIR=.
+
+###############################################################################
+
+SOURCE_DIR=sources
+
+REMOVE_CPP_COMMANDS=$(FIRM_JNI_TOOLS_DIR)/remove_cpp_comands.perl
+CRECODER=$(FIRM_JNI_TOOLS_DIR)/crecoder.jar
+
+all: classfiles javafiles jni