aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-11-10 07:33:13 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-11-10 07:33:13 +0000
commit569c45cab2354a2ce5e2657f6cd159d8ab84cd5a (patch)
treed796bda95733fb08ccdd83b3bb15d461745b1f41 /Makefile.rules
parent22a8e9e511c337566a96044eba363771f72d2786 (diff)
downloadexternal_llvm-569c45cab2354a2ce5e2657f6cd159d8ab84cd5a.zip
external_llvm-569c45cab2354a2ce5e2657f6cd159d8ab84cd5a.tar.gz
external_llvm-569c45cab2354a2ce5e2657f6cd159d8ab84cd5a.tar.bz2
Proper way of doing llvm canadian-cross compilation.
Patch by Jim Grosbach! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules48
1 files changed, 10 insertions, 38 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 3fdae66..849c70b 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -184,7 +184,7 @@ endif
$(UserTargets):: $(PreConditions)
all:: all-local
-clean:: clean-local
+clean:: clean-local
clean-all:: clean-local clean-all-local
install:: install-local
uninstall:: uninstall-local
@@ -309,29 +309,17 @@ endif
#--------------------------------------------------------------------
TargetMode :=
ifeq ($(LLVM_CROSS_COMPILING),1)
- ifeq ($(BUILD_COMPONENT),1)
- TargetMode := Build
- else
- TargetMode := Host
- endif
- BuildLLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/Build/bin
+ BuildLLVMToolDir := $(LLVM_OBJ_ROOT)/BuildTools/$(BuildMode)/bin
endif
ObjRootDir := $(PROJ_OBJ_DIR)/$(BuildMode)
-# It is very important that ObjDir not have an extra trailing
-# slash. This ends up changing the rules so that dependency file (.d)
-# information is not used at all!
-ifeq ($(TargetMode),)
- ObjDir := $(ObjRootDir)
-else
- ObjDir := $(ObjRootDir)/$(TargetMode)
-endif
-LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/lib
-ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/bin
-ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/examples
-LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/lib
-LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/bin
-LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/$(TargetMode)/examples
+ObjDir := $(ObjRootDir)
+LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
+ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
+ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
+LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
+LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
+LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
CFERuntimeLibDir := $(LLVMGCCDIR)/lib
#--------------------------------------------------------------------
@@ -347,7 +335,7 @@ LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
endif
ifndef TBLGEN
ifeq ($(LLVM_CROSS_COMPILING),1)
- TBLGEN := $(BuildLLVMToolDir)/tblgen$(EXEEXT)
+ TBLGEN := $(BuildLLVMToolDir)/tblgen$(BUILD_EXEEXT)
else
TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
endif
@@ -594,16 +582,6 @@ ifdef DIRS
SubDirs += $(DIRS)
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
-ifdef BUILD_TARGET_DIRS
-$(RecursiveTargets)::
- $(Verb) for dir in $(BUILD_TARGET_DIRS); do \
- if [ ! -f $$dir/Makefile ]; then \
- $(MKDIR) $$dir; \
- $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
- fi; \
- ($(MAKE) -C $$dir $@ BUILD_COMPONENT=1 NO_INSTALL=1 ) || exit 1; \
- done
-endif
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
if [ ! -f $$dir/Makefile ]; then \
@@ -613,12 +591,6 @@ $(RecursiveTargets)::
($(MAKE) -C $$dir $@ ) || exit 1; \
done
else
-ifdef BUILD_TARGET_DIRS
-$(RecursiveTargets)::
- $(Verb) for dir in $(BUILD_TARGET_DIRS); do \
- ($(MAKE) -C $$dir $@ BUILD_COMPONENT=1 NO_INSTALL=1 ) || exit 1; \
- done
-endif
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
($(MAKE) -C $$dir $@ ) || exit 1; \