summaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-13 22:14:47 +0000
committerChris Lattner <sabre@nondot.org>2002-09-13 22:14:47 +0000
commit4bb13b8eb1bf3314894c8d388770a6bc2665f6fb (patch)
tree6e6718c4bacaaaffe2e2b380b91218923d6b0195 /Makefile.common
parent9ada838909e3577e044b05835bc69e092fb799d4 (diff)
downloadllvm-4bb13b8eb1bf3314894c8d388770a6bc2665f6fb.tar.gz
llvm-4bb13b8eb1bf3314894c8d388770a6bc2665f6fb.tar.bz2
llvm-4bb13b8eb1bf3314894c8d388770a6bc2665f6fb.tar.xz
Factor platform specific makefile directives out into their own makefile
fragments. This is gross, but having tons of confusing conditionals all throughout the build system seems worst. Credits got to Casey Carter for the idea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common29
1 files changed, 12 insertions, 17 deletions
diff --git a/Makefile.common b/Makefile.common
index ba24c10dc6..38a4e66cf6 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -46,6 +46,14 @@ include $(LEVEL)/Makefile.config
#
#ENABLE_OPTIMIZED = 1
+
+# 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 $(LEVEL)/Makefile.$(UNAME)
+
ifdef SHARED_LIBRARY
# if SHARED_LIBRARY is specified, the default is to build the dynamic lib
dynamic ::
@@ -142,6 +150,10 @@ LinkO := $(Link) -O3 -L $(LIBRELEASE)
# Create one .o file from a bunch of .o files...
Relink = ld -r
+# MakeSO - Create a .so file from a .o files...
+MakeSO := $(CXX) $(MakeSharedObjectOption) $(PROFILE)
+MakeSOO := $(MakeSO) -O3
+
# Create dependancy file from CPP file, send to stdout.
Depend := $(CXX) -MM -I$(LEVEL)/include $(CPPFLAGS)
@@ -194,23 +206,6 @@ endif
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