summaryrefslogtreecommitdiff
path: root/tools/llvmc/plugins
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-03-02 09:01:14 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-03-02 09:01:14 +0000
commitf188178a2f8e6452d3e161acdad9a79e1f36c43f (patch)
treede8d87fb2706a89f24bc57ce512955909645eecc /tools/llvmc/plugins
parent99dac47b0abfaf40c36822a11310b43e95654e50 (diff)
downloadllvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.gz
llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.bz2
llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.xz
Reorganize llvmc code.
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change the build system accordingly. Makes it easier for projects using LLVM to build their own llvmc-based drivers. Tested with objdir != srcdir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc/plugins')
-rw-r--r--tools/llvmc/plugins/Base/Makefile4
-rw-r--r--tools/llvmc/plugins/Clang/Makefile4
-rw-r--r--tools/llvmc/plugins/Hello/Makefile4
-rw-r--r--tools/llvmc/plugins/Makefile45
-rw-r--r--tools/llvmc/plugins/Simple/Makefile4
5 files changed, 16 insertions, 45 deletions
diff --git a/tools/llvmc/plugins/Base/Makefile b/tools/llvmc/plugins/Base/Makefile
index 5ca6048508..eb6ed010c6 100644
--- a/tools/llvmc/plugins/Base/Makefile
+++ b/tools/llvmc/plugins/Base/Makefile
@@ -7,7 +7,9 @@
#
##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
LLVMC_PLUGIN = Base
BUILT_SOURCES = AutoGenerated.inc
-include ../Makefile
+include $(LEVEL)/Makefile.llvmc
diff --git a/tools/llvmc/plugins/Clang/Makefile b/tools/llvmc/plugins/Clang/Makefile
index 32060138c2..a1b011e90d 100644
--- a/tools/llvmc/plugins/Clang/Makefile
+++ b/tools/llvmc/plugins/Clang/Makefile
@@ -7,7 +7,9 @@
#
##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
LLVMC_PLUGIN = Clang
BUILT_SOURCES = AutoGenerated.inc
-include ../Makefile
+include $(LEVEL)/Makefile.llvmc
diff --git a/tools/llvmc/plugins/Hello/Makefile b/tools/llvmc/plugins/Hello/Makefile
index 181dd0c605..8e9fa6f313 100644
--- a/tools/llvmc/plugins/Hello/Makefile
+++ b/tools/llvmc/plugins/Hello/Makefile
@@ -7,6 +7,8 @@
#
##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
LLVMC_PLUGIN = Hello
-include ../Makefile
+include $(LEVEL)/Makefile.llvmc
diff --git a/tools/llvmc/plugins/Makefile b/tools/llvmc/plugins/Makefile
index 734323f50d..37dac6f0ac 100644
--- a/tools/llvmc/plugins/Makefile
+++ b/tools/llvmc/plugins/Makefile
@@ -1,4 +1,4 @@
-##===- tools/llvmc/plugins/Makefile.plugins ----------------*- Makefile -*-===##
+##===- tools/llvmc/plugins/Makefile ------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
@@ -7,49 +7,12 @@
#
##===----------------------------------------------------------------------===##
-ifndef LLVMC_PLUGIN
-
LEVEL = ../../..
-DIRS = $(BUILTIN_PLUGINS)
-
-# TOFIX: Should we also build DSO versions of plugins?
-export BUILTIN_LLVMC_PLUGIN=1
-
-include $(LEVEL)/Makefile.common
-else # LLVMC_PLUGIN
-
-LEVEL = ../../../..
-
-LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN))
-REQUIRES_EH = 1
-
-ifndef BUILTIN_LLVMC_PLUGIN
-LOADABLE_MODULE = 1
+ifneq ($(LLVMC_BUILTIN_PLUGINS),)
+DIRS = $(LLVMC_BUILTIN_PLUGINS)
endif
-ifneq ($(BUILT_SOURCES),)
-BUILD_AUTOGENERATED_INC=1
-endif
+export LLVMC_BUILTIN_PLUGIN=1
include $(LEVEL)/Makefile.common
-
-# TOFIX: This probably should go into Makefile.rules
-
-ifdef BUILD_AUTOGENERATED_INC
-
-TOOLS_SOURCE := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td))
-
-TD_COMMON :=$(strip $(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 # BUILD_AUTOGENERATED_INC
-
-endif # LLVMC_PLUGIN
diff --git a/tools/llvmc/plugins/Simple/Makefile b/tools/llvmc/plugins/Simple/Makefile
index 1cd5af7a15..c38cda5171 100644
--- a/tools/llvmc/plugins/Simple/Makefile
+++ b/tools/llvmc/plugins/Simple/Makefile
@@ -7,7 +7,9 @@
#
##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
LLVMC_PLUGIN = Simple
BUILT_SOURCES = AutoGenerated.inc
-include ../Makefile
+include $(LEVEL)/Makefile.llvmc