[llvm-commits] CVS: llvm/Makefile.common

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 13 16:42:00 PDT 2002


Changes in directory llvm:

Makefile.common updated: 1.45 -> 1.46

---
Log message:

Link .so files correctly on either linux or solaris


---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.45 llvm/Makefile.common:1.46
--- llvm/Makefile.common:1.45	Fri Sep 13 11:02:26 2002
+++ llvm/Makefile.common	Fri Sep 13 16:41:07 2002
@@ -139,11 +139,6 @@
 LinkG    := $(Link) -g  -L $(LIBDEBUG)
 LinkO    := $(Link) -O3 -L $(LIBRELEASE)
 
-# Create a .so file from a .o files...
-#MakeSO   := $(CXX) -shared $(PROFILE)
-MakeSO   := $(CXX) -G $(PROFILE)
-MakeSOO  := $(MakeSO) -O3
-
 # Create one .o file from a bunch of .o files...
 Relink = ld -r
 
@@ -198,6 +193,23 @@
 #  of it.  For this reason, sometimes it's useful to use libraries as .a files.
 
 ifdef LIBRARYNAME
+
+# Figure out how to make a .so file on this platform.  This is really gross and
+# should be autoconfiscated (automake actually), but should hopefully work on
+# linux and solaris.
+#
+
+# Create a .so file from a .o files...
+UNAME := $(shell uname)
+
+ifeq ($(UNAME), SunOS)
+MakeSO   := $(CXX) -G $(PROFILE)
+else
+MakeSO   := $(CXX) -shared $(PROFILE)
+endif
+
+MakeSOO  := $(MakeSO) -O3
+
 
 LIBNAME_O    := $(LIBRELEASE)/lib$(LIBRARYNAME).so
 LIBNAME_G    := $(LIBDEBUG)/lib$(LIBRARYNAME).so





More information about the llvm-commits mailing list