aboutsummaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-02-03 22:01:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-02-03 22:01:15 +0000
commit0ecd2964214374045e699e3dc58c9093d9686293 (patch)
tree68e77cd3382e457e94f473f96a1b7db6f0537928 /Makefile.rules
parent69df72367f45c0414541196efaf7c13b1ccd3f08 (diff)
Factor the computation of the basename of libraries. This avoids renaming
them on install. Before we would have LLVMgold.so on the build directory but libLLVMgold.so on the install dir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules
index cb439d3676..eab886190c 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1083,12 +1083,14 @@ ifdef LIBRARYNAME
# Make sure there isn't any extraneous whitespace on the LIBRARYNAME option
LIBRARYNAME := $(strip $(LIBRARYNAME))
ifdef LOADABLE_MODULE
-LibName.A := $(LibDir)/$(LIBRARYNAME).a
-LibName.SO := $(SharedLibDir)/$(LIBRARYNAME)$(SHLIBEXT)
+BaseLibName.A := $(LIBRARYNAME).a
+BaseLibName.SO := $(LIBRARYNAME)$(SHLIBEXT)
else
-LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
-LibName.SO := $(SharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)
+BaseLibName.A := lib$(LIBRARYNAME).a
+BaseLibName.SO := $(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)
endif
+LibName.A := $(LibDir)/$(BaseLibName.A)
+LibName.SO := $(SharedLibDir)/$(BaseLibName.SO)
LibName.O := $(LibDir)/$(LIBRARYNAME).o
LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca
@@ -1142,7 +1144,7 @@ DestSharedLibDir := $(DESTDIR)$(PROJ_bindir)
else
DestSharedLibDir := $(DESTDIR)$(PROJ_libdir)
endif
-DestSharedLib := $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)
+DestSharedLib := $(DestSharedLibDir)/$(BaseLibName.SO)
install-local:: $(DestSharedLib)