optimizer and codegen
[oota-llvm.git] / Makefile
index 36031f7cb3d8fb217972f49da6abf99f8ad62275..58a5fe5e1833fe732055baca8fae2db89a276060 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,12 @@ EXTRA_DIST := test llvm.spec include win32 Xcode
 
 include $(LEVEL)/Makefile.config 
 
+# When cross-compiling, there are some things (tablegen) that need to
+# be build for the build system.
+ifeq ($(LLVM_CROSS_COMPILING),1)
+  BUILD_TARGET_DIRS := lib/System lib/Support utils
+endif
+
 # llvm-gcc4 doesn't need runtime libs.  llvm-gcc4 is the only supported one.
 # FIXME: Remove runtime entirely once we have an understanding of where
 # libprofile etc should go.
@@ -77,9 +83,9 @@ debug-opt-prof:
 dist-hook::
        $(Echo) Eliminating files constructed by configure
        $(Verb) $(RM) -f \
-         $(TopDistDir)/include/llvm/ADT/hash_map  \
-         $(TopDistDir)/include/llvm/ADT/hash_set  \
-         $(TopDistDir)/include/llvm/ADT/iterator  \
+         $(TopDistDir)/include/llvm/ADT/hash_map.h  \
+         $(TopDistDir)/include/llvm/ADT/hash_set.h  \
+         $(TopDistDir)/include/llvm/ADT/iterator.h  \
          $(TopDistDir)/include/llvm/Config/config.h  \
          $(TopDistDir)/include/llvm/Support/DataTypes.h  \
          $(TopDistDir)/include/llvm/Support/ThreadSupport.h
@@ -95,9 +101,9 @@ install-libs: install
 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
+  include/llvm/ADT/hash_map.h \
+  include/llvm/ADT/hash_set.h \
+  include/llvm/ADT/iterator.h
 FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
 
 all-local:: $(FilesToConfigPATH)