2008-05-06 18:08:12 +00:00
|
|
|
##===- tools/llvmc2/Makefile -------------------------------*- Makefile -*-===##
|
2008-03-23 08:57:20 +00:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open
|
|
|
|
# Source License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
2008-10-02 21:15:05 +00:00
|
|
|
|
|
|
|
# Compiled-in plugins
|
2008-10-03 00:26:49 +00:00
|
|
|
##### FIXME: This breaks the build.
|
|
|
|
#####BUILTIN_PLUGINS = Base
|
2008-10-02 21:15:05 +00:00
|
|
|
|
2008-03-23 08:57:20 +00:00
|
|
|
LEVEL = ../..
|
|
|
|
TOOLNAME = llvmc2
|
|
|
|
LINK_COMPONENTS = support system
|
|
|
|
REQUIRES_EH := 1
|
|
|
|
|
2008-10-02 21:15:05 +00:00
|
|
|
ifneq ($(BUILTIN_PLUGINS),)
|
|
|
|
|
|
|
|
export BUILTIN_LLVMC_PLUGIN=1
|
|
|
|
USEDLIBS = $(patsubst %,LLVMC%,$(BUILTIN_PLUGINS))
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2008-03-23 08:57:20 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2008-10-02 21:15:05 +00:00
|
|
|
TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)
|
|
|
|
|
|
|
|
# There is probably a better way to do this: currently we enter the
|
|
|
|
# subdirectory 2 times - the second time is not needed.
|
|
|
|
# This probably also needs to be integrated into Makefile.rules.
|
|
|
|
define PLUGIN_template
|
|
|
|
PLUGIN_$(1)_SOURCES=$$(wildcard plugins/$(1)/*.cpp)
|
|
|
|
PLUGIN_$(1)_TD_SOURCES=$$(wildcard plugins/$(1)/*.cpp)
|
|
|
|
|
|
|
|
$$(LibDir)/LLVMC$(1).o: $$(PLUGIN_$(1)_SOURCES) $$(PLUGIN_$(1)_TD_SOURCES) \
|
|
|
|
$$(TD_COMMON)
|
|
|
|
@$$(MAKE) -C plugins/$(1)
|
2008-03-23 08:57:20 +00:00
|
|
|
|
2008-10-02 21:15:05 +00:00
|
|
|
$$(RecursiveTargets) ::
|
|
|
|
@$$(MAKE) -C plugins/$(1) $$@
|
|
|
|
endef
|
2008-03-23 08:57:20 +00:00
|
|
|
|
2008-10-02 21:15:05 +00:00
|
|
|
$(foreach plugin,$(BUILTIN_PLUGINS),$(eval $(call PLUGIN_template,$(plugin))))
|