rust/mk/llvm.mk

25 lines
555 B
Makefile
Raw Normal View History

ifdef CFG_ENABLE_FAST_MAKE
LLVM_DEPS := $(S)/.gitmodules
else
2011-11-02 01:09:44 +01:00
# This is just a rough approximation of LLVM deps
LLVM_DEPS=$(call rwildcard,$(CFG_LLVM_SRC_DIR),*cpp *hpp)
endif
2011-11-01 23:48:30 +01:00
define DEF_LLVM_RULES
# If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves
ifeq ($(CFG_LLVM_ROOT),)
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
@$$(call E, make: llvm)
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
$$(Q)touch $$(LLVM_CONFIG_$(1))
endif
endef
$(foreach target,$(CFG_TARGET_TRIPLES), \
2012-03-27 03:36:48 +02:00
$(eval $(call DEF_LLVM_RULES,$(target))))