summaryrefslogtreecommitdiff
path: root/examples/ModuleMaker/Makefile.common.in
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ModuleMaker/Makefile.common.in')
-rw-r--r--examples/ModuleMaker/Makefile.common.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/ModuleMaker/Makefile.common.in b/examples/ModuleMaker/Makefile.common.in
new file mode 100644
index 0000000000..b90ad9f926
--- /dev/null
+++ b/examples/ModuleMaker/Makefile.common.in
@@ -0,0 +1,23 @@
+#
+# 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_OBJ_ROOT=$(LEVEL)/../..
+
+#
+# Grab the LLVM configuration file.
+#
+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
+