2008-10-03 09:09:34 +00:00
|
|
|
##===- tools/llvmc2/plugins/Makefile.plugins ----------------*- Makefile -*-===##
|
2008-10-02 22:41:42 +00:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open
|
|
|
|
# Source License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
LEVEL = ../../../..
|
|
|
|
|
|
|
|
ifndef LLVMC_PLUGIN
|
|
|
|
$(error LLVMC_PLUGIN variable is not defined!)
|
|
|
|
endif
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2008-10-03 09:09:34 +00:00
|
|
|
# TOFIX: This should go into Makefile.rules
|
|
|
|
|
2008-10-02 22:41:42 +00:00
|
|
|
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
|