-LLVM_OBJ_ROOT = $(BUILD_OBJ_ROOT)
-endif
-
-# Figure out how to do platform specific stuff on this platform. This is really
-# gross and should be autoconfiscated (automake actually), but should hopefully
-# work on Linux and solaris (SunOS).
-#
-UNAME := $(shell uname)
-include $(LLVM_SRC_ROOT)/Makefile.$(UNAME)
-
-ifdef SHARED_LIBRARY
-# if SHARED_LIBRARY is specified, the default is to build the dynamic lib
-dynamic ::
-endif
-
-# Default Rule: Make sure it's also a :: rule
-all ::
-
-# Default for install is to at least build everything...
-install ::
-
-# Default rule for test. It ensures everything has a test rule
-test::
-
-prdirs::
- echo "LLVM Source Root : $(LLVM_SRC_ROOT)"; \
- echo "LLVM Object Root : $(LLVM_OBJ_ROOT)"; \
- echo "Build Source Root : $(BUILD_SRC_ROOT)"; \
- echo "Build Source Directory : $(BUILD_SRC_DIR)"; \
- echo "Build Object Root : $(BUILD_OBJ_ROOT)"; \
- echo "Build Object Directory : $(BUILD_OBJ_DIR)";
-
-#--------------------------------------------------------------------
-# Variables derived from configuration options...
-#--------------------------------------------------------------------
-
-#BinInstDir=/usr/local/bin
-#LibInstDir=/usr/local/lib/xxx
-#DocInstDir=/usr/doc/xxx
-
-BURG_OPTS = -I
-
-PURIFY := $(PURIFY) -cache-dir="$(BUILD_OBJ_ROOT)/../purifycache" -chain-length="30" -messages=all
-
-ifdef ENABLE_PROFILING
- ENABLE_OPTIMIZED = 1
- CONFIGURATION := Profile
-else
- ifdef ENABLE_OPTIMIZED
- CONFIGURATION := Release
- else
- CONFIGURATION := Debug
- endif
-endif
-
-###########################################################################
-# Library Locations
-# These variables describe various library locations:
-#
-# DEST* = Location of where libraries that are built will be placed.
-# LLVM* = Location of LLVM libraries used for linking.
-# PROJ* = Location of previously built libraries used for linking.
-###########################################################################
-
-# Libraries that are being built
-DESTLIBDEBUG := $(BUILD_OBJ_ROOT)/lib/Debug
-DESTLIBRELEASE := $(BUILD_OBJ_ROOT)/lib/Release
-DESTLIBPROFILE := $(BUILD_OBJ_ROOT)/lib/Profile
-DESTLIBCURRENT := $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION)
-
-# LLVM libraries used for linking
-LLVMLIBDEBUGSOURCE := $(LLVM_OBJ_ROOT)/lib/Debug
-LLVMLIBRELEASESOURCE := $(LLVM_OBJ_ROOT)/lib/Release
-LLVMLIBPROFILESOURCE := $(LLVM_OBJ_ROOT)/lib/Profile
-LLVMLIBCURRENTSOURCE := $(LLVM_OBJ_ROOT)/lib/$(CONFIGURATION)
-
-# Libraries that were built that will now be used for linking
-PROJLIBDEBUGSOURCE := $(BUILD_OBJ_ROOT)/lib/Debug
-PROJLIBRELEASESOURCE := $(BUILD_OBJ_ROOT)/lib/Release
-PROJLIBPROFILESOURCE := $(BUILD_OBJ_ROOT)/lib/Profile
-PROJLIBCURRENTSOURCE := $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION)
-
-###########################################################################
-# Tool Locations
-# These variables describe various tool locations:
-#
-# DEST* = Location of where tools that are built will be placed.
-# LLVM* = Location of LLVM tools used for building.
-# PROJ* = Location of previously built tools used for linking.
-###########################################################################
-
-DESTTOOLDEBUG := $(BUILD_OBJ_ROOT)/tools/Debug
-DESTTOOLRELEASE := $(BUILD_OBJ_ROOT)/tools/Release
-DESTTOOLPROFILE := $(BUILD_OBJ_ROOT)/tools/Profile
-DESTTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)
-
-LLVMTOOLDEBUG := $(LLVM_OBJ_ROOT)/tools/Debug
-LLVMTOOLRELEASE := $(LLVM_OBJ_ROOT)/tools/Release
-LLVMTOOLPROFILE := $(LLVM_OBJ_ROOT)/tools/Profile
-LLVMTOOLCURRENT := $(LLVM_OBJ_ROOT)/tools/$(CONFIGURATION)
-
-PROJTOOLDEBUG := $(BUILD_OBJ_ROOT)/tools/Debug
-PROJTOOLRELEASE := $(BUILD_OBJ_ROOT)/tools/Release
-PROJTOOLPROFILE := $(BUILD_OBJ_ROOT)/tools/Profile
-PROJTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)
-
-# Verbosity levels
-ifndef VERBOSE
-VERB := @
-endif
-
-#---------------------------------------------------------
-# Compilation options...
-#---------------------------------------------------------
-
-###########################################################################
-# Special tools used while building the LLVM tree. Burg is built as part of the
-# utils directory.
-###########################################################################
-BURG := $(LLVMTOOLCURRENT)/burg
-RunBurg := $(BURG) $(BURG_OPTS)
-
-TBLGEN := $(LLVMTOOLCURRENT)/tblgen
-
-# Enable this for profiling support with 'gprof'
-# This automatically enables optimized builds.
-ifdef ENABLE_PROFILING
- PROFILE = -pg
-endif
-
-###########################################################################
-# Compile Time Flags
-###########################################################################
-
-#
-# Include both the project headers and the LLVM headers for compilation
-#
-CPPFLAGS += -I$(BUILD_SRC_ROOT)/include -I$(LLVM_SRC_ROOT)/include
-
-# By default, strip symbol information from executable
-ifndef KEEP_SYMBOLS
-STRIP = $(PLATFORMSTRIPOPTS)
-STRIP_WARN_MSG = "(without symbols) "
-endif
-
-# Allow gnu extensions...
-CPPFLAGS += -D_GNU_SOURCE
-
-# -Wno-unused-parameter
-CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
-CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
-
-# Compile a cpp file, don't link...
-Compile := $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts)
-CompileG := $(Compile) -g -D_DEBUG
-CompileO := $(Compile) $(CompileOptimizeOpts) -felide-constructors -fomit-frame-pointer
-CompileP := $(Compile) $(CompileOptimizeOpts) -felide-constructors $(PROFILE)
-
-# Compile a c file, don't link...
-CompileC := $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts)
-CompileCG := $(CompileC) -g -D_DEBUG
-CompileCO := $(CompileC) $(CompileOptimizeOpts) -fomit-frame-pointer
-CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE)
-
-
-# Link final executable
-
-ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
-Link := $(PURIFY) $(CXX) -static
-else
-Link := $(CXX)
-endif
-
-ifdef PROJ_COMPILE
-# include both projlib source and llvmlib source
-LinkG := $(Link) -g -L$(PROJLIBDEBUGSOURCE) -L$(LLVMLIBDEBUGSOURCE) $(STRIP)
-LinkO := $(Link) -O3 -L$(PROJLIBRELEASESOURCE) -L$(LLVMLIBRELEASESOURCE)
-LinkP := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE)