Change Library Names Not To Conflict With Others When Installed


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/examples/ModuleMaker/Makefile b/examples/ModuleMaker/Makefile
index c99b7e7..2bd8a38 100644
--- a/examples/ModuleMaker/Makefile
+++ b/examples/ModuleMaker/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 LEVEL=../..
 TOOLNAME=ModuleMaker
-USEDLIBS= bcwriter vmcore support.a LLVMsystem.a
+USEDLIBS= LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Analysis/Makefile b/lib/Analysis/Makefile
index 2a8d34e..b679b57 100644
--- a/lib/Analysis/Makefile
+++ b/lib/Analysis/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../..
-LIBRARYNAME = analysis
+LIBRARYNAME = LLVMAnalysis
 PARALLEL_DIRS = IPA DataStructure
 BUILD_ARCHIVE = 1
 
diff --git a/lib/AsmParser/Makefile b/lib/AsmParser/Makefile
index b5e6fb9..2b85e1a 100644
--- a/lib/AsmParser/Makefile
+++ b/lib/AsmParser/Makefile
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 
-LIBRARYNAME = asmparser
+LIBRARYNAME = LLVMAsmParser
 
 include $(LEVEL)/Makefile.common
 
diff --git a/lib/CodeGen/Makefile b/lib/CodeGen/Makefile
index cc72a03..05453a3 100644
--- a/lib/CodeGen/Makefile
+++ b/lib/CodeGen/Makefile
@@ -9,6 +9,6 @@
 
 LEVEL = ../..
 PARALLEL_DIRS = SelectionDAG
-LIBRARYNAME = codegen
+LIBRARYNAME = LLVMCodeGen
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/CodeGen/SelectionDAG/Makefile b/lib/CodeGen/SelectionDAG/Makefile
index d3fc5a9..85aafab 100644
--- a/lib/CodeGen/SelectionDAG/Makefile
+++ b/lib/CodeGen/SelectionDAG/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
 PARALLEL_DIRS =
-LIBRARYNAME = selectiondag
+LIBRARYNAME = LLVMSelectionDAG
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Debugger/Makefile b/lib/Debugger/Makefile
index 1cb6e0d..b9df8dc 100644
--- a/lib/Debugger/Makefile
+++ b/lib/Debugger/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../..
-LIBRARYNAME = debugger
+LIBRARYNAME = LLVMDebugger
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/ExecutionEngine/Makefile b/lib/ExecutionEngine/Makefile
index a100b70..c4998fc 100644
--- a/lib/ExecutionEngine/Makefile
+++ b/lib/ExecutionEngine/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
-LIBRARYNAME = executionengine
+LIBRARYNAME = LLVMExecutionEngine
 PARALLEL_DIRS = Interpreter JIT
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Support/Makefile b/lib/Support/Makefile
index 0b66604..2e4a5b0 100644
--- a/lib/Support/Makefile
+++ b/lib/Support/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
-LIBRARYNAME = support
+LIBRARYNAME = LLVMSupport
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/System/Makefile b/lib/System/Makefile
index e40fe4b..d0a7acf 100644
--- a/lib/System/Makefile
+++ b/lib/System/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
-LIBRARYNAME = LLVMsystem
+LIBRARYNAME = LLVMSystem
 BUILD_ARCHIVE = 1
 
 EXTRA_DIST = AIX Cygwin Darwin FreeBSD Interix Linux SunOS Unix Win32
diff --git a/lib/System/Unix/MappedFile.cpp b/lib/System/Unix/MappedFile.cpp
index fec2408..7e03cd1 100644
--- a/lib/System/Unix/MappedFile.cpp
+++ b/lib/System/Unix/MappedFile.cpp
@@ -20,7 +20,6 @@
 #include "Unix.h"
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <sys/stat.h>
 
 namespace llvm {
 using namespace sys;
diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc
index fec2408..7e03cd1 100644
--- a/lib/System/Unix/MappedFile.inc
+++ b/lib/System/Unix/MappedFile.inc
@@ -20,7 +20,6 @@
 #include "Unix.h"
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <sys/stat.h>
 
 namespace llvm {
 using namespace sys;
diff --git a/lib/Target/CBackend/Makefile b/lib/Target/CBackend/Makefile
index 7fcc434..fc32db0 100644
--- a/lib/Target/CBackend/Makefile
+++ b/lib/Target/CBackend/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../../..
-LIBRARYNAME = cwriter
+LIBRARYNAME = LLVMCBackend
 include $(LEVEL)/Makefile.common
 
diff --git a/lib/Target/Makefile b/lib/Target/Makefile
index da74511..7c525ef 100644
--- a/lib/Target/Makefile
+++ b/lib/Target/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 PARALLEL_DIRS = CBackend X86 SparcV9 PowerPC Skeleton
-LIBRARYNAME = target
+LIBRARYNAME = LLVMTarget
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Target/PowerPC/Makefile b/lib/Target/PowerPC/Makefile
index 05768ab..9543281 100644
--- a/lib/Target/PowerPC/Makefile
+++ b/lib/Target/PowerPC/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = powerpc
+LIBRARYNAME = LLVMPowerPC
 TARGET = PowerPC
 
 # Make sure that tblgen is run, first thing.
diff --git a/lib/Target/Skeleton/Makefile b/lib/Target/Skeleton/Makefile
index bc9a16d..07ce6f2 100644
--- a/lib/Target/Skeleton/Makefile
+++ b/lib/Target/Skeleton/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../../..
-LIBRARYNAME = skeleton
+LIBRARYNAME = LLVMSkeleton
 
 TARGET = Skeleton
 # Make sure that tblgen is run, first thing.
diff --git a/lib/Target/SparcV9/InstrSched/Makefile b/lib/Target/SparcV9/InstrSched/Makefile
index 81caf77..ea2c3aa 100644
--- a/lib/Target/SparcV9/InstrSched/Makefile
+++ b/lib/Target/SparcV9/InstrSched/Makefile
@@ -9,6 +9,6 @@
 
 LEVEL = ../../../..
 DIRS  = 
-LIBRARYNAME = sparcv9sched
+LIBRARYNAME = LLVMSparcV9InstrSched
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Target/SparcV9/LiveVar/Makefile b/lib/Target/SparcV9/LiveVar/Makefile
index 6973f63..a2a53e6 100644
--- a/lib/Target/SparcV9/LiveVar/Makefile
+++ b/lib/Target/SparcV9/LiveVar/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../../../..
-LIBRARYNAME = sparcv9livevar
+LIBRARYNAME = LLVMSparcV9LiveVar
 
 include $(LEVEL)/Makefile.common
 
diff --git a/lib/Target/SparcV9/Makefile b/lib/Target/SparcV9/Makefile
index 363b73c..30ee869 100644
--- a/lib/Target/SparcV9/Makefile
+++ b/lib/Target/SparcV9/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = sparcv9
+LIBRARYNAME = LLVMSparcV9
 PARALLEL_DIRS = InstrSched LiveVar ModuloScheduling RegAlloc
 
 BUILT_SOURCES = \
diff --git a/lib/Target/SparcV9/ModuloScheduling/Makefile b/lib/Target/SparcV9/ModuloScheduling/Makefile
index 44bf5ed..2ec0503 100644
--- a/lib/Target/SparcV9/ModuloScheduling/Makefile
+++ b/lib/Target/SparcV9/ModuloScheduling/Makefile
@@ -9,6 +9,6 @@
 
 LEVEL = ../../../..
 DIRS  = 
-LIBRARYNAME = sparcv9modulosched
+LIBRARYNAME = LLVMSparcV9ModuloSched
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Target/SparcV9/RegAlloc/Makefile b/lib/Target/SparcV9/RegAlloc/Makefile
index 4daa1f5..c19984c 100644
--- a/lib/Target/SparcV9/RegAlloc/Makefile
+++ b/lib/Target/SparcV9/RegAlloc/Makefile
@@ -9,7 +9,7 @@
 
 LEVEL = ../../../..
 DIRS  = 
-LIBRARYNAME = sparcv9regalloc
+LIBRARYNAME = LLVMSparcV9RegAlloc
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Target/X86/Makefile b/lib/Target/X86/Makefile
index bdaf28c..87115ea 100644
--- a/lib/Target/X86/Makefile
+++ b/lib/Target/X86/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = x86
+LIBRARYNAME = LLVMX86
 TARGET = X86
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \
diff --git a/lib/Transforms/Hello/Makefile b/lib/Transforms/Hello/Makefile
index af4253d..d9886a9 100644
--- a/lib/Transforms/Hello/Makefile
+++ b/lib/Transforms/Hello/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../../..
-LIBRARYNAME = hello
+LIBRARYNAME = LLVMHello
 SHARED_LIBRARY = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Transforms/IPO/Makefile b/lib/Transforms/IPO/Makefile
index fe82fc1..4f4563f 100644
--- a/lib/Transforms/IPO/Makefile
+++ b/lib/Transforms/IPO/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = ipo
+LIBRARYNAME = LLVMipo
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Transforms/Instrumentation/Makefile b/lib/Transforms/Instrumentation/Makefile
index e1831af..d749b6b 100644
--- a/lib/Transforms/Instrumentation/Makefile
+++ b/lib/Transforms/Instrumentation/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = instrument
+LIBRARYNAME = LLVMInstrumentation 
 PARALLEL_DIRS = ProfilePaths 
 BUILD_ARCHIVE = 1
 
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Makefile b/lib/Transforms/Instrumentation/ProfilePaths/Makefile
index 8deeeac..5a7477c 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/Makefile
+++ b/lib/Transforms/Instrumentation/ProfilePaths/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
-LIBRARYNAME = profpaths
+LIBRARYNAME = LLVMProfilePaths
 
 include $(LEVEL)/Makefile.common
 
diff --git a/lib/Transforms/Makefile b/lib/Transforms/Makefile
index 88a2ca2..25cee59 100644
--- a/lib/Transforms/Makefile
+++ b/lib/Transforms/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 PARALLEL_DIRS = Utils Instrumentation Scalar IPO
-LIBRARYNAME = transforms
+LIBRARYNAME = LLVMTransforms
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Transforms/Scalar/Makefile b/lib/Transforms/Scalar/Makefile
index 6ea90d1..267747f 100644
--- a/lib/Transforms/Scalar/Makefile
+++ b/lib/Transforms/Scalar/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = scalaropts
+LIBRARYNAME = LLVMScalarOpts
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/Transforms/Utils/Makefile b/lib/Transforms/Utils/Makefile
index f4da983..b349b6c 100644
--- a/lib/Transforms/Utils/Makefile
+++ b/lib/Transforms/Utils/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = transformutils
+LIBRARYNAME = LLVMTransformUtils
 BUILD_ARCHIVE = 1
 
 include $(LEVEL)/Makefile.common
diff --git a/lib/VMCore/Makefile b/lib/VMCore/Makefile
index 9fc1c96..d3df2bf 100644
--- a/lib/VMCore/Makefile
+++ b/lib/VMCore/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
-LIBRARYNAME = vmcore
+LIBRARYNAME = LLVMCore
 
 include $(LEVEL)/Makefile.common
 
diff --git a/projects/Stacker/samples/Makefile b/projects/Stacker/samples/Makefile
index d5b9b6e..22190a7 100644
--- a/projects/Stacker/samples/Makefile
+++ b/projects/Stacker/samples/Makefile
@@ -24,7 +24,7 @@
 all :: $(SAMPLES)
 
 ifdef OPTIMIZE
-%.bc : %.st 
+% : %.st 
 	@$(ECHO) "Compiling and Optimizing $< to $*.bc"
 	$(VERB)$(STKRC_EXEC) -e -o - $< | opt -stats -q -f -o $*.bc \
 	    -aa-eval -adce -branch-combine -cee -constmerge -constprop -dce -die -ds-aa \
diff --git a/projects/Stacker/tools/stkrc/Makefile b/projects/Stacker/tools/stkrc/Makefile
index f413dc2..4f352836 100644
--- a/projects/Stacker/tools/stkrc/Makefile
+++ b/projects/Stacker/tools/stkrc/Makefile
@@ -8,10 +8,11 @@
 #
 # Give the name of a library.  This will build a dynamic version.
 #
-TOOLNAME=stkrc
-LLVMLIBS= asmparser bcwriter transforms ipo.a ipa.a \
-	 scalaropts analysis.a target.a transformutils \
-	 vmcore support.a LLVMsystem.a 
+TOOLNAME = stkrc
+LLVMLIBS = LLVMAsmParser LLVMBCWriter LLVMTransforms LLVMipo.a LLVMipa.a \
+	   LLVMScalarOpts LLVMAnalysis.a LLVMTarget.a LLVMTransformUtils \
+	   LLVMCore LLVMSupport.a LLVMSystem.a 
+
 USEDLIBS=stkr_compiler 
 
 
diff --git a/tools/Makefile.JIT b/tools/Makefile.JIT
index 8c9e5b0..7a2c48f 100644
--- a/tools/Makefile.JIT
+++ b/tools/Makefile.JIT
@@ -18,7 +18,7 @@
 include $(LEVEL)/Makefile.config
 
 # Generic JIT libraries
-JITLIBS   = lli-jit codegen executionengine
+JITLIBS   = LLVMJIT LLVMCodeGen LLVMExecutionEngine
 ARCHLIBS  =
 
 # You can enable the X86 JIT on a non-X86 host by setting the flag
@@ -30,7 +30,7 @@
 
 # What the X86 JIT requires
 ifdef ENABLE_X86_JIT
-  JITLIBS  += x86 selectiondag
+  JITLIBS  += LLVMX86 LLVMSelectionDAG
   # X86 doesn't require any ARCHLIBS
 endif
 
@@ -43,10 +43,10 @@
 
 # What the Sparc JIT requires
 ifdef ENABLE_SPARCV9_JIT
-  JITLIBS  += sparcv9
-  ARCHLIBS += sparcv9sched sparcv9livevar instrument.a profpaths \
-              bcwriter transforms.a ipo.a ipa.a datastructure.a \
-              sparcv9regalloc
+  JITLIBS  += LLVMSparcV9
+  ARCHLIBS += LLVMSparcV9sched LLVMSparcV9livevar LLVMInstrumentation.a \
+              LLVMProfilePaths LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
+	      LLVMDataStructure.a LLVMSparcV9regalloc
 endif
 
 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
@@ -58,8 +58,9 @@
 
 # What the PowerPC JIT requires
 ifdef ENABLE_PPC_JIT
-  JITLIBS  += powerpc
+  JITLIBS  += LLVMPowerPC
 endif
 
-USEDLIBS += lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
-            transformutils.a bcreader vmcore support target.a LLVMsystem.a
+USEDLIBS += LLVMInterpreter $(JITLIBS) $(ARCHLIBS) LLVMScalarOpts \
+            LLVMAnalysis.a LLVMTransformUtils.a LLVMBCReader LLVMCore \
+	    LLVMSupport.a LLVMTarget.a LLVMSystem.a
diff --git a/tools/analyze/Makefile b/tools/analyze/Makefile
index ec94fe6..0d76f27 100644
--- a/tools/analyze/Makefile
+++ b/tools/analyze/Makefile
@@ -8,9 +8,9 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 TOOLNAME = analyze
-USEDLIBS = asmparser bcreader analysis ipa datastructure scalaropts.a \
-           transforms.a target.a scalaropts.a transformutils.a vmcore support \
-           LLVMsystem.a
+USEDLIBS = LLVMAsmParser LLVMBCReader LLVMAnalysis LLVMipa LLVMDataStructure \
+	   LLVMScalarOpts.a LLVMTransforms.a LLVMTarget.a LLVMScalarOpts.a \
+	   LLVMTransformUtils.a LLVMCore LLVMSupport.a LLVMSystem.a
 
 TOOLLINKOPTS = $(PLATFORMLIBDL)
 
diff --git a/tools/bugpoint/Makefile b/tools/bugpoint/Makefile
index aa1338c..e3addbd 100644
--- a/tools/bugpoint/Makefile
+++ b/tools/bugpoint/Makefile
@@ -10,11 +10,12 @@
 
 TOOLNAME = bugpoint
 
-OPTLIBS  = transforms instrument profpaths 
-ANALIBS  = datastructure ipa target.a 
+OPTLIBS  = LLVMTransforms LLVMInstrumentation LLVMProfilePaths
+ANALIBS  = LLVMDataStructure LLVMipa LLVMTarget.a 
 
-USEDLIBS = ipo scalaropts analysis $(OPTLIBS) $(ANALIBS) transformutils \
-           asmparser bcreader bcwriter vmcore support LLVMsystem.a
+USEDLIBS = LLVMipo LLVMScalarOpts LLVMAnalysis $(OPTLIBS) $(ANALIBS) \
+	   LLVMTransformUtils LLVMAsmParser LLVMBCReader LLVMBCWriter LLVMCore \
+	   LLVMSupport.a LLVMSystem.a
 
 TOOLLINKOPTS = $(PLATFORMLIBDL)
 
diff --git a/tools/extract/Makefile b/tools/extract/Makefile
index 35c624a..14a8124 100644
--- a/tools/extract/Makefile
+++ b/tools/extract/Makefile
@@ -9,7 +9,8 @@
 LEVEL = ../..
 
 TOOLNAME = extract
-USEDLIBS = bcreader bcwriter transforms.a ipo.a target.a analysis.a \
-           transformutils.a ipa.a vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMTarget.a \
+	   LLVMAnalysis.a LLVMTransformUtils.a LLVMipa.a LLVMCore LLVMSupport.a \
+	   LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/gccas/Makefile b/tools/gccas/Makefile
index 37404d4..e67f3ad 100644
--- a/tools/gccas/Makefile
+++ b/tools/gccas/Makefile
@@ -9,7 +9,8 @@
 LEVEL = ../..
 
 TOOLNAME = gccas
-USEDLIBS = asmparser bcwriter transforms ipo.a ipa.a scalaropts analysis.a \
-           target.a transformutils vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMAsmParser LLVMBCWriter LLVMTransforms LLVMipo.a LLVMipa.a \
+	   LLVMScalarOpts LLVMAnalysis.a LLVMTarget.a LLVMTransformUtils \
+	   LLVMCore LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/gccld/Makefile b/tools/gccld/Makefile
index fe1b166..2915c6b 100644
--- a/tools/gccld/Makefile
+++ b/tools/gccld/Makefile
@@ -10,7 +10,8 @@
 LEVEL = ../..
 
 TOOLNAME = gccld
-USEDLIBS = ipo.a transforms.a scalaropts.a analysis.a ipa.a transformutils.a \
-           target.a bcreader bcwriter vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMipo.a LLVMTransforms.a LLVMScalarOpts.a LLVMAnalysis.a LLVMipa.a \
+	   LLVMTransformUtils.a LLVMTarget.a LLVMBCReader LLVMBCWriter LLVMCore \
+	   LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/llc/Makefile b/tools/llc/Makefile
index c11c521..553ff95 100644
--- a/tools/llc/Makefile
+++ b/tools/llc/Makefile
@@ -10,27 +10,28 @@
 LEVEL = ../..
 TOOLNAME = llc
 USEDLIBS = \
-	cwriter \
-	powerpc \
-	sparcv9 \
-	x86 \
-	skeleton \
-	selectiondag \
-	sparcv9regalloc \
-	sparcv9sched \
-	codegen \
-	target.a \
-	sparcv9livevar \
-	ipa.a \
-	transforms.a \
-	scalaropts.a \
-	analysis.a \
-	transformutils.a \
-	bcreader \
-	bcwriter \
-	vmcore \
-	support.a \
-	LLVMsystem.a
+	LLVMCBackend \
+	LLVMPowerPC \
+	LLVMSparcV9 \
+	LLVMX86 \
+	LLVMSkeleton \
+	LLVMSelectionDAG \
+	LLVMSparcV9RegAlloc \
+	LLVMSparcV9InstrSched \
+	LLVMCodeGen \
+	LLVMTarget.a \
+	LLVMSparcV9LiveVar \
+	LLVMipa.a \
+	LLVMTransforms.a \
+	LLVMScalarOpts.a \
+	LLVMAnalysis.a \
+	LLVMTransformUtils.a \
+	LLVMBCReader \
+	LLVMBCWriter \
+	LLVMCore \
+	LLVMSupport.a \
+	LLVMSystem.a
+
 TOOLLINKOPTS = $(PLATFORMLIBDL)
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/llee/Makefile b/tools/llee/Makefile
index fdf3389..9e9fc60 100644
--- a/tools/llee/Makefile
+++ b/tools/llee/Makefile
@@ -7,7 +7,7 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
-LIBRARYNAME = execve
+LIBRARYNAME = LLVMexecve
 SHARED_LIBRARY = 1
 include $(LEVEL)/Makefile.common
 
diff --git a/tools/llvm-ar/Makefile b/tools/llvm-ar/Makefile
index 2f4257b..938f73e 100644
--- a/tools/llvm-ar/Makefile
+++ b/tools/llvm-ar/Makefile
@@ -9,6 +9,6 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-ar 
-USEDLIBS = bcreader vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-as/Makefile b/tools/llvm-as/Makefile
index 689e268..5482aa1 100644
--- a/tools/llvm-as/Makefile
+++ b/tools/llvm-as/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 TOOLNAME = llvm-as
-USEDLIBS = asmparser bcwriter vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMAsmParser LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-bcanalyzer/Makefile b/tools/llvm-bcanalyzer/Makefile
index e913be2..17a9d32 100644
--- a/tools/llvm-bcanalyzer/Makefile
+++ b/tools/llvm-bcanalyzer/Makefile
@@ -9,5 +9,5 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-bcanalyzer
-USEDLIBS = bcreader vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-db/Makefile b/tools/llvm-db/Makefile
index db09054..e1f1f2d 100644
--- a/tools/llvm-db/Makefile
+++ b/tools/llvm-db/Makefile
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 TOOLNAME = llvm-db
-USEDLIBS = debugger
+USEDLIBS = LLVMDebugger
 
 # Enable JIT support
 include ../Makefile.JIT
diff --git a/tools/llvm-dis/Makefile b/tools/llvm-dis/Makefile
index 2b0189d..3c8d3b5 100644
--- a/tools/llvm-dis/Makefile
+++ b/tools/llvm-dis/Makefile
@@ -9,5 +9,5 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-dis
-USEDLIBS = bcreader vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-ld/Linker.cpp b/tools/llvm-ld/Linker.cpp
index 4af152b..9d19995 100644
--- a/tools/llvm-ld/Linker.cpp
+++ b/tools/llvm-ld/Linker.cpp
@@ -86,6 +86,7 @@
   std::set<std::string> DefinedSymbols;
   UndefinedSymbols.clear();   // Start out empty
   
+  // Add in all the external functions
   for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
     if (I->hasName()) {
       if (I->isExternal())
@@ -93,6 +94,8 @@
       else if (!I->hasInternalLinkage())
         DefinedSymbols.insert(I->getName());
     }
+
+  // Add in all the external globals
   for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I)
     if (I->hasName()) {
       if (I->isExternal())
diff --git a/tools/llvm-link/Makefile b/tools/llvm-link/Makefile
index 1fc4683..4986272 100644
--- a/tools/llvm-link/Makefile
+++ b/tools/llvm-link/Makefile
@@ -9,6 +9,6 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-link
-USEDLIBS = bcreader bcwriter vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-nm/Makefile b/tools/llvm-nm/Makefile
index d1b1bd1..b3f1702 100644
--- a/tools/llvm-nm/Makefile
+++ b/tools/llvm-nm/Makefile
@@ -9,5 +9,5 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-nm
-USEDLIBS = bcreader vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-prof/Makefile b/tools/llvm-prof/Makefile
index c187296..567bc43 100644
--- a/tools/llvm-prof/Makefile
+++ b/tools/llvm-prof/Makefile
@@ -9,5 +9,5 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-prof
-USEDLIBS = analysis.a bcreader vmcore support.a LLVMsystem.a
+USEDLIBS = LLVMAnalysis.a LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a
 include $(LEVEL)/Makefile.common
diff --git a/tools/opt/Makefile b/tools/opt/Makefile
index de0568a..e43fed3 100644
--- a/tools/opt/Makefile
+++ b/tools/opt/Makefile
@@ -9,10 +9,11 @@
 LEVEL = ../..
 TOOLNAME = opt
 
-USEDLIBS = bcreader bcwriter \
-           instrument profpaths scalaropts \
-           ipo ipa datastructure transforms target.a analysis \
-           transformutils vmcore support LLVMsystem.a
+USEDLIBS = LLVMBCReader LLVMBCWriter LLVMInstrumentation LLVMProfilePaths \
+	   LLVMScalarOpts LLVMipo LLVMipa LLVMDataStructure LLVMTransforms \
+	   LLVMTarget.a LLVMAnalysis LLVMTransformUtils LLVMCore LLVMSupport.a \
+	   LLVMSystem.a 
+
 TOOLLINKOPTS = $(PLATFORMLIBDL)
 
 include $(LEVEL)/Makefile.common
diff --git a/utils/TableGen/Makefile b/utils/TableGen/Makefile
index 93fd75a..aad4c8d 100644
--- a/utils/TableGen/Makefile
+++ b/utils/TableGen/Makefile
@@ -8,7 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 TOOLNAME = tblgen
-USEDLIBS = support.a LLVMsystem.a
+USEDLIBS = LLVMSupport.a LLVMSystem.a
 
 include $(LEVEL)/Makefile.common
 
diff --git a/utils/fpcmp/Makefile b/utils/fpcmp/Makefile
index e38c51d..5ba547e 100644
--- a/utils/fpcmp/Makefile
+++ b/utils/fpcmp/Makefile
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 TOOLNAME = fpcmp
-USEDLIBS = support.a
+USEDLIBS = LLVMSupport.a
 
 include $(LEVEL)/Makefile.common