+##===- lib/ExecutionEngine/Makefile ------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
LEVEL = ../..
-TOOLNAME = lli
-DIRS = Interpreter JIT
+LIBRARYNAME = LLVMExecutionEngine
-JITLIBS = lli-jit codegen x86
-USEDLIBS = lli-interpreter $(JITLIBS) bcreader vmcore analysis.a support.a target.a
-#transforms.a
+include $(LEVEL)/Makefile.config
-# Have gcc tell the linker to export symbols from the program so that
-# dynamically loaded modules can be linked against them.
-#
-TOOLLINKOPTS = -ldl
+PARALLEL_DIRS = Interpreter MCJIT Orc RuntimeDyld
+
+ifeq ($(USE_INTEL_JITEVENTS), 1)
+PARALLEL_DIRS += IntelJITEvents
+endif
+
+ifeq ($(USE_OPROFILE), 1)
+PARALLEL_DIRS += OProfileJIT
+endif
-include $(LEVEL)/Makefile.common
+include $(LLVM_SRC_ROOT)/Makefile.rules