Documentation: clarify what is meant by 'multiple edges'.
[oota-llvm.git] / tools / llvmc / plugins / Makefile
1 ##===- tools/llvmc/plugins/Makefile.plugins ----------------*- Makefile -*-===##
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is distributed under the University of Illinois Open
6 # Source License. See LICENSE.TXT for details.
7 #
8 ##===----------------------------------------------------------------------===##
9
10 ifndef LLVMC_PLUGIN
11
12 LEVEL = ../../..
13 DIRS = $(BUILTIN_PLUGINS)
14
15 # TOFIX: Should we also build DSO versions of plugins?
16 export BUILTIN_LLVMC_PLUGIN=1
17
18 include $(LEVEL)/Makefile.common
19
20 else # LLVMC_PLUGIN
21
22 LEVEL = ../../../..
23
24 LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
25 REQUIRES_EH = 1
26
27 ifndef BUILTIN_LLVMC_PLUGIN
28 LOADABLE_MODULE = 1
29 endif
30
31 ifneq ($(BUILT_SOURCES),)
32 BUILD_AUTOGENERATED_INC=1
33 endif
34
35 include $(LEVEL)/Makefile.common
36
37 # TOFIX: This probably should go into Makefile.rules
38
39 ifdef BUILD_AUTOGENERATED_INC
40
41 TOOLS_SOURCE := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td))
42
43 TD_COMMON :=$(strip $(wildcard \
44                 $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
45
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, $@) $<
50
51 AutoGenerated.inc : $(ObjDir)/AutoGenerated.inc.tmp
52         $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
53 endif # BUILD_AUTOGENERATED_INC
54
55 endif # LLVMC_PLUGIN