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

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 13 17:15:01 PDT 2002


Changes in directory llvm:

Makefile.Linux added (r1.1)
Makefile.SunOS added (r1.1)
Makefile.common updated: 1.46 -> 1.47

---
Log message:

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.



---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.46 llvm/Makefile.common:1.47
--- llvm/Makefile.common:1.46	Fri Sep 13 16:41:07 2002
+++ llvm/Makefile.common	Fri Sep 13 17:14:47 2002
@@ -46,6 +46,14 @@
 #
 #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 @@
 # 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) 
 
@@ -193,23 +205,6 @@
 #  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