2012-12-11 01:32:48 +00:00
|
|
|
# Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
# file at the top-level directory of this distribution and at
|
|
|
|
# http://rust-lang.org/COPYRIGHT.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
# option. This file may not be copied, modified, or distributed
|
|
|
|
# except according to those terms.
|
|
|
|
|
2012-02-10 20:07:01 +00:00
|
|
|
|
|
|
|
ifdef CFG_ENABLE_FAST_MAKE
|
|
|
|
LLVM_DEPS := $(S)/.gitmodules
|
|
|
|
else
|
2011-11-26 03:25:09 +00:00
|
|
|
|
2011-11-02 00:09:44 +00:00
|
|
|
# This is just a rough approximation of LLVM deps
|
2011-11-26 03:25:09 +00:00
|
|
|
LLVM_DEPS=$(call rwildcard,$(CFG_LLVM_SRC_DIR),*cpp *hpp)
|
2012-02-10 20:07:01 +00:00
|
|
|
endif
|
2011-11-01 22:48:30 +00:00
|
|
|
|
2011-11-02 23:21:17 +00:00
|
|
|
define DEF_LLVM_RULES
|
|
|
|
|
|
|
|
# If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves
|
|
|
|
ifeq ($(CFG_LLVM_ROOT),)
|
|
|
|
|
2011-11-26 03:25:09 +00:00
|
|
|
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
|
2011-11-02 23:21:17 +00:00
|
|
|
@$$(call E, make: llvm)
|
2011-11-03 23:13:22 +00:00
|
|
|
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
|
2011-12-13 01:06:43 +00:00
|
|
|
$$(Q)touch $$(LLVM_CONFIG_$(1))
|
2011-11-02 23:21:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2013-02-22 00:15:01 +00:00
|
|
|
$(foreach host,$(CFG_HOST_TRIPLES), \
|
|
|
|
$(eval $(call DEF_LLVM_RULES,$(host))))
|