2008-11-25 21:38:12 +00:00
|
|
|
##===- tools/llvmc/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.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
ifndef LLVMC_PLUGIN
|
2008-10-03 10:26:37 +00:00
|
|
|
|
|
|
|
LEVEL = ../../..
|
|
|
|
DIRS = $(BUILTIN_PLUGINS)
|
|
|
|
|
2008-10-16 14:02:29 +00:00
|
|
|
# TOFIX: Should we also build DSO versions of plugins?
|
2008-10-03 10:26:37 +00:00
|
|
|
export BUILTIN_LLVMC_PLUGIN=1
|
|
|
|
|
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
|
|
|
else # LLVMC_PLUGIN
|
|
|
|
|
|
|
|
LEVEL = ../../../..
|
2008-10-02 22:41:42 +00:00
|
|
|
|
2009-01-21 13:05:00 +00:00
|
|
|
LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN))
|
2008-10-02 22:41:42 +00:00
|
|
|
REQUIRES_EH = 1
|
|
|
|
|
|
|
|
ifndef BUILTIN_LLVMC_PLUGIN
|
|
|
|
LOADABLE_MODULE = 1
|
|
|
|
endif
|
|
|
|
|
2008-10-16 14:02:29 +00:00
|
|
|
ifneq ($(BUILT_SOURCES),)
|
2008-10-15 14:22:06 +00:00
|
|
|
BUILD_AUTOGENERATED_INC=1
|
2008-10-02 22:41:42 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2008-10-16 14:02:29 +00:00
|
|
|
# TOFIX: This probably should go into Makefile.rules
|
2008-10-03 09:09:34 +00:00
|
|
|
|
2008-10-02 22:41:42 +00:00
|
|
|
ifdef BUILD_AUTOGENERATED_INC
|
2008-10-16 14:02:29 +00:00
|
|
|
|
|
|
|
TOOLS_SOURCE := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td))
|
|
|
|
|
|
|
|
TD_COMMON :=$(strip $(wildcard \
|
|
|
|
$(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
|
2008-10-02 22:41:42 +00:00
|
|
|
|
|
|
|
$(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) $< $@
|
2008-10-03 10:26:37 +00:00
|
|
|
endif # BUILD_AUTOGENERATED_INC
|
|
|
|
|
|
|
|
endif # LLVMC_PLUGIN
|