summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73e1d0f)
raw | patch | inline | side by side (parent: 73e1d0f)
author | Chris Lattner <sabre@nondot.org> | |
Fri, 13 Sep 2002 21:41:07 +0000 (21:41 +0000) | ||
committer | Chris Lattner <sabre@nondot.org> | |
Fri, 13 Sep 2002 21:41:07 +0000 (21:41 +0000) |
Makefile.common | patch | blob | history | |
Makefile.rules | patch | blob | history |
diff --git a/Makefile.common b/Makefile.common
index 029c2c987a5814e5254d30acbb71311f6b91a0f6..ba24c10dc64e477a28c66dc8332bb5fb9d127529 100644 (file)
--- a/Makefile.common
+++ b/Makefile.common
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
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
LIBNAME_AO := $(LIBRELEASE)/lib$(LIBRARYNAME).a
diff --git a/Makefile.rules b/Makefile.rules
index 029c2c987a5814e5254d30acbb71311f6b91a0f6..ba24c10dc64e477a28c66dc8332bb5fb9d127529 100644 (file)
--- a/Makefile.rules
+++ b/Makefile.rules
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
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
LIBNAME_AO := $(LIBRELEASE)/lib$(LIBRARYNAME).a