2012-02-10 14:07:01 -06:00
|
|
|
|
|
|
|
ifdef CFG_ENABLE_FAST_MAKE
|
|
|
|
LLVM_DEPS := $(S)/.gitmodules
|
|
|
|
else
|
2011-11-25 21:25:09 -06:00
|
|
|
|
2011-11-01 19:09:44 -05:00
|
|
|
# This is just a rough approximation of LLVM deps
|
2011-11-25 21:25:09 -06:00
|
|
|
LLVM_DEPS=$(call rwildcard,$(CFG_LLVM_SRC_DIR),*cpp *hpp)
|
2012-02-10 14:07:01 -06:00
|
|
|
endif
|
2011-11-01 17:48:30 -05:00
|
|
|
|
2011-11-02 18:21:17 -05:00
|
|
|
define DEF_LLVM_RULES
|
|
|
|
|
|
|
|
# If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves
|
|
|
|
ifeq ($(CFG_LLVM_ROOT),)
|
|
|
|
|
2011-11-25 21:25:09 -06:00
|
|
|
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
|
2011-11-02 18:21:17 -05:00
|
|
|
@$$(call E, make: llvm)
|
2011-11-03 18:13:22 -05:00
|
|
|
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
|
2011-12-12 19:06:43 -06:00
|
|
|
$$(Q)touch $$(LLVM_CONFIG_$(1))
|
2011-11-02 18:21:17 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
2012-03-26 20:36:48 -05:00
|
|
|
$(eval $(call DEF_LLVM_RULES,$(target))))
|