Transform floor((double)FLT) -> (double)floorf(FLT), implementing
[oota-llvm.git] / Makefile.rules
index ae4e65247fb9827f19adb246f05efade8fe0f99c..61e683239e890dded4d3070827301115b70ec5a3 100644 (file)
@@ -28,6 +28,13 @@ TopLevelTargets  := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
 UserTargets      := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
 InternalTargets  := preconditions distdir dist-hook
 
+FilesToConfig := \
+  include/llvm/Config/config.h \
+  include/llvm/Support/DataTypes.h \
+  include/llvm/ADT/hash_map \
+  include/llvm/ADT/hash_set \
+  include/llvm/ADT/iterator
+
 ################################################################################
 # INITIALIZATION: Basic things the makefile needs
 ################################################################################
@@ -77,6 +84,9 @@ ifneq ($(MakefileConfigIn),)
 PreConditions      += $(MakefileConfig)
 endif
 
+FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
+PreConditions      += $(FilesToConfigPATH)
+
 preconditions : $(PreConditions)
 
 #------------------------------------------------------------------------
@@ -134,6 +144,11 @@ $(ConfigStatusScript): $(ConfigureScript)
          $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
          $(ConfigStatusScript)
 
+.PRECIOUS: $(FilesToConfigPATH)
+$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in 
+       $(Echo) Regenerating $*
+       $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
+
 #------------------------------------------------------------------------
 # Make sure the configuration makefile is up to date
 #------------------------------------------------------------------------
@@ -602,6 +617,18 @@ ifdef ENABLE_PPC_JIT
   JIT_LIBS += LLVMPowerPC LLVMSelectionDAG
 endif
 
+# You can enable the Alpha JIT on a non-Alpha host by setting the flag
+# ENABLE_ALPHA_JIT on the make command line. If not, it will still be
+# enabled automagically on an Alpha host.
+ifeq ($(ARCH), Alpha)
+  ENABLE_ALPHA_JIT = 1
+endif
+
+# What the Alpha JIT requires
+ifdef ENABLE_ALPHA_JIT
+  JIT_LIBS += LLVMAlpha LLVMSelectionDAG
+endif
+
 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \
             LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
             LLVMSystem.a $(PLATFORMLIBDL)
@@ -613,6 +640,12 @@ endif
 # (defined by the user's project) and "LLVM" libs (defined 
 # by the # LLVM project).
 #---------------------------------------------------------
+# Some versions of gcc on Alpha produce too many symbols, so use a .a file
+ifeq ($(ARCH),Alpha)
+USEDLIBS :=  $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
+LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS))
+endif
+
 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o,  $(ProjLibsOptions))
 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
@@ -1558,3 +1591,4 @@ printvars::
        $(Echo) "YaccFiles    : " '$(YaccFiles)'
        $(Echo) "LexFiles     : " '$(LexFiles)'
        $(Echo) "Module       : " '$(Module)'
+       $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'