summaryrefslogtreecommitdiff
path: root/examples/ModuleMaker
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ModuleMaker')
-rw-r--r--examples/ModuleMaker/Makefile.common21
1 files changed, 17 insertions, 4 deletions
diff --git a/examples/ModuleMaker/Makefile.common b/examples/ModuleMaker/Makefile.common
index 9b34d875272..b90ad9f9264 100644
--- a/examples/ModuleMaker/Makefile.common
+++ b/examples/ModuleMaker/Makefile.common
@@ -1,10 +1,23 @@
#
-# Set this variable to the top of the LLVM source tree.
+# Configure the location of the LLVM object root. We know it is two
+# directories up. The source tree location we do not know; let the LLVM
+# Makefiles find it for us.
#
-LLVM_SRC_ROOT = $(LEVEL)/../..
+LLVM_OBJ_ROOT=$(LEVEL)/../..
#
-# Include LLVM's Master Makefile.
+# Grab the LLVM configuration file.
#
-include $(LLVM_SRC_ROOT)/Makefile.common
+include $(LEVEL)/../../Makefile.config
+
+#
+# Reconfigure the source directories
+#
+BUILD_SRC_ROOT:=$(LLVM_SRC_ROOT)/projects/ModuleMaker
+BUILD_SRC_DIR := $(subst //,/,$(BUILD_SRC_ROOT)/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR)))
+
+#
+# Include LLVM's build rules.
+#
+include $(LLVM_SRC_ROOT)/Makefile.rules