aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-10-02 22:41:42 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-10-02 22:41:42 +0000
commit597f3f8c5d5ed4a848a3b15bb75a4fce2628759c (patch)
tree88ba35c9ccec1746f8ef6e7424805551fbfd0728
parentd98d6203e429b2d7208b6687931e9079e85e95ec (diff)
Fix build breakage.
Forgot to include Makefile.plugins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56970 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/llvmc2/plugins/Base/Makefile2
-rw-r--r--tools/llvmc2/plugins/Clang/Makefile2
-rw-r--r--tools/llvmc2/plugins/Hello/Makefile2
-rw-r--r--tools/llvmc2/plugins/Makefile.plugins41
4 files changed, 44 insertions, 3 deletions
diff --git a/tools/llvmc2/plugins/Base/Makefile b/tools/llvmc2/plugins/Base/Makefile
index e72f4fe38e..d8f7610b07 100644
--- a/tools/llvmc2/plugins/Base/Makefile
+++ b/tools/llvmc2/plugins/Base/Makefile
@@ -9,4 +9,4 @@
LLVMC_PLUGIN = Base
-include ../Makefile.common
+include ../Makefile.plugins
diff --git a/tools/llvmc2/plugins/Clang/Makefile b/tools/llvmc2/plugins/Clang/Makefile
index 8904588222..da1043ed04 100644
--- a/tools/llvmc2/plugins/Clang/Makefile
+++ b/tools/llvmc2/plugins/Clang/Makefile
@@ -9,5 +9,5 @@
LLVMC_PLUGIN = Clang
-include ../Makefile.common
+include ../Makefile.plugins
diff --git a/tools/llvmc2/plugins/Hello/Makefile b/tools/llvmc2/plugins/Hello/Makefile
index 8cd0b57a00..0fcaaa7dc5 100644
--- a/tools/llvmc2/plugins/Hello/Makefile
+++ b/tools/llvmc2/plugins/Hello/Makefile
@@ -9,4 +9,4 @@
LLVMC_PLUGIN = Hello
-include ../Makefile.common
+include ../Makefile.plugins
diff --git a/tools/llvmc2/plugins/Makefile.plugins b/tools/llvmc2/plugins/Makefile.plugins
new file mode 100644
index 0000000000..4b5d19abf6
--- /dev/null
+++ b/tools/llvmc2/plugins/Makefile.plugins
@@ -0,0 +1,41 @@
+##===- tools/llvmc2/plugins/Makefile.common ----------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open
+# Source License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../../../..
+
+ifndef LLVMC_PLUGIN
+$(error LLVMC_PLUGIN variable is not defined!)
+endif
+
+LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
+TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td)
+REQUIRES_EH = 1
+
+ifndef BUILTIN_LLVMC_PLUGIN
+LOADABLE_MODULE = 1
+endif
+
+ifneq ($(TOOLS_SOURCE),"")
+BUILD_AUTOGENERATED_INC=1
+BUILT_SOURCES = AutoGenerated.inc
+endif
+
+include $(LEVEL)/Makefile.common
+
+ifdef BUILD_AUTOGENERATED_INC
+TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)
+
+$(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \
+ $(TBLGEN) $(TD_COMMON)
+ $(Echo) "Building LLVMC configuration library with tblgen"
+ $(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $<
+
+AutoGenerated.inc : $(ObjDir)/AutoGenerated.inc.tmp
+ $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
+endif