diff --git a/tools/llvmc2/Makefile b/tools/llvmc2/Makefile index 63f933deb2e..3f35de09178 100644 --- a/tools/llvmc2/Makefile +++ b/tools/llvmc2/Makefile @@ -11,10 +11,9 @@ LEVEL = ../.. BUILTIN_PLUGINS = Base DRIVER_NAME = llvmc2 -DIRS = $(patsubst %,plugins/%,$(BUILTIN_PLUGINS)) src +DIRS = plugins src export BUILTIN_PLUGINS export DRIVER_NAME -export BUILTIN_LLVMC_PLUGIN=1 include $(LEVEL)/Makefile.common diff --git a/tools/llvmc2/plugins/Base/Makefile b/tools/llvmc2/plugins/Base/Makefile index d8f7610b07e..89cdaf4a9e8 100644 --- a/tools/llvmc2/plugins/Base/Makefile +++ b/tools/llvmc2/plugins/Base/Makefile @@ -9,4 +9,4 @@ LLVMC_PLUGIN = Base -include ../Makefile.plugins +include ../Makefile diff --git a/tools/llvmc2/plugins/Clang/Makefile b/tools/llvmc2/plugins/Clang/Makefile index da1043ed04c..e48824aa952 100644 --- a/tools/llvmc2/plugins/Clang/Makefile +++ b/tools/llvmc2/plugins/Clang/Makefile @@ -9,5 +9,5 @@ LLVMC_PLUGIN = Clang -include ../Makefile.plugins +include ../Makefile diff --git a/tools/llvmc2/plugins/Hello/Makefile b/tools/llvmc2/plugins/Hello/Makefile index 0fcaaa7dc5d..f0d51ddbfcb 100644 --- a/tools/llvmc2/plugins/Hello/Makefile +++ b/tools/llvmc2/plugins/Hello/Makefile @@ -9,4 +9,4 @@ LLVMC_PLUGIN = Hello -include ../Makefile.plugins +include ../Makefile diff --git a/tools/llvmc2/plugins/Makefile.plugins b/tools/llvmc2/plugins/Makefile similarity index 82% rename from tools/llvmc2/plugins/Makefile.plugins rename to tools/llvmc2/plugins/Makefile index 51e297d3758..568752e5784 100644 --- a/tools/llvmc2/plugins/Makefile.plugins +++ b/tools/llvmc2/plugins/Makefile @@ -7,11 +7,20 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../../../.. - ifndef LLVMC_PLUGIN -$(error LLVMC_PLUGIN variable is not defined!) -endif + +LEVEL = ../../.. +DIRS = $(BUILTIN_PLUGINS) + +# TOFIX: DSO versions of plugins are not built + +export BUILTIN_LLVMC_PLUGIN=1 + +include $(LEVEL)/Makefile.common + +else # LLVMC_PLUGIN + +LEVEL = ../../../.. LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td) @@ -40,4 +49,6 @@ $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \ AutoGenerated.inc : $(ObjDir)/AutoGenerated.inc.tmp $(Verb) $(CMP) -s $@ $< || $(CP) $< $@ -endif +endif # BUILD_AUTOGENERATED_INC + +endif # LLVMC_PLUGIN