blob: 568752e5784edebd7e9459dd2f39a78609189254 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
##===- tools/llvmc2/plugins/Makefile.plugins ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open
# Source License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
ifndef LLVMC_PLUGIN
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)
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
# TOFIX: This should go into Makefile.rules
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 # BUILD_AUTOGENERATED_INC
endif # LLVMC_PLUGIN
|