1 ##===- tools/llvmc2/plugins/Makefile.plugins ----------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open
6 # Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
13 DIRS = $(BUILTIN_PLUGINS)
15 # TOFIX: Should we also build DSO versions of plugins?
16 export BUILTIN_LLVMC_PLUGIN=1
18 include $(LEVEL)/Makefile.common
24 LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
27 ifndef BUILTIN_LLVMC_PLUGIN
31 ifneq ($(BUILT_SOURCES),)
32 BUILD_AUTOGENERATED_INC=1
35 include $(LEVEL)/Makefile.common
37 # TOFIX: This probably should go into Makefile.rules
39 ifdef BUILD_AUTOGENERATED_INC
41 TOOLS_SOURCE := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td))
43 TD_COMMON :=$(strip $(wildcard \
44 $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
46 $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \
47 $(TBLGEN) $(TD_COMMON)
48 $(Echo) "Building LLVMC configuration library with tblgen"
49 $(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $<
51 AutoGenerated.inc : $(ObjDir)/AutoGenerated.inc.tmp
52 $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
53 endif # BUILD_AUTOGENERATED_INC