Simplifications to Makefile.common, remove support for Purify since it was
authorChris Lattner <sabre@nondot.org>
Thu, 14 Aug 2003 21:10:25 +0000 (21:10 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Aug 2003 21:10:25 +0000 (21:10 +0000)
broken by libtoolification anyways, and noone can use it because purify doesn't
support the 64-bit sparc compilers even if it weren't broken!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7850 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.common
Makefile.rules

index 21d86eb17e7def53f0d175ba461384138805b555..3d89a1c12b418cccf61de1d2fe4cc6370491c53c 100644 (file)
@@ -140,6 +140,11 @@ ifdef SHARED_LIBRARY
 all:: dynamic
 endif
 
+ifdef BYTECODE_LIBRARY
+# if BYTECODE_LIBRARY is specified, the default is to build the bytecode lib
+all:: bytecodelib
+endif
+
 # Default Rule:  Make sure it's also a :: rule
 all ::
 
@@ -167,7 +172,7 @@ prdirs::
 # slightly since GNU Make will not try to find implicit rules for targets
 # which are marked as Phony.
 #
-.PHONY: all dynamic clean distclean install test bytecode prdirs
+.PHONY: all dynamic bytecodelib clean distclean install test bytecode prdirs
 
 ###########################################################################
 # Miscellaneous paths and commands:
@@ -185,8 +190,6 @@ prdirs::
 
 BURG_OPTS = -I
 
-PURIFY := $(PURIFY) -cache-dir="$(BUILD_OBJ_ROOT)/../purifycache" -chain-length="30" -messages=all 
-
 ifdef ENABLE_PROFILING
   ENABLE_OPTIMIZED = 1
   CONFIGURATION := Profile
@@ -265,11 +268,7 @@ PROJTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)
 #
 # Libtool is found in the current directory.
 #
-ifdef VERBOSE
-LIBTOOL=$(LLVM_SRC_ROOT)/mklib
-else
-LIBTOOL=$(LLVM_SRC_ROOT)/mklib --silent
-endif
+LIBTOOL := $(LLVM_SRC_ROOT)/mklib
 
 #
 # If we're not building a shared library, use the disable-shared tag with
@@ -283,7 +282,7 @@ endif
 # versions of libtool.
 #
 ifndef SHARED_LIBRARY
-LIBTOOL := $(LIBTOOL) --tag=disable-shared
+LIBTOOL += --tag=disable-shared
 endif
 
 #
@@ -291,6 +290,7 @@ endif
 #
 ifndef VERBOSE
 VERB := @
+LIBTOOL += --silent
 endif
 
 ###########################################################################
@@ -328,7 +328,6 @@ endif
 # Allow gnu extensions...
 CPPFLAGS += -D_GNU_SOURCE
 
-# -Wno-unused-parameter
 CompileCommonOpts := -Wall -W  -Wwrite-strings -Wno-unused -I$(LEVEL)/include
 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
 
@@ -356,11 +355,7 @@ CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE)
 # Link final executable
 #      (Note that we always link with the C++ compiler).
 #
-ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
-Link     := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static
-else
 Link     := $(LIBTOOL) --mode=link $(CXX)
-endif
 
 # link both projlib and llvmlib libraries
 LinkG    := $(Link) -g -L$(PROJLIBDEBUGSOURCE)  -L$(LLVMLIBDEBUGSOURCE) $(STRIP)
@@ -368,26 +363,20 @@ LinkO    := $(Link) -O3 -L$(PROJLIBRELEASESOURCE) -L$(LLVMLIBRELEASESOURCE)
 LinkP    := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE)
 
 # Create one .o file from a bunch of .o files...
-#ifdef SHARED_LIBRARY
-Relink = ${LIBTOOL} --mode=link $(CXX)
-#else
-Relink = ${LIBTOOL} --mode=link $(CXX) -only-static
-#endif
-
-# MakeSO - Create a .so file from a .o files...
-#MakeSO   := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption)
-#MakeSOO  := $(MakeSO) -O3
-#MakeSOP  := $(MakeSOO) $(PROFILE)
+Relink := ${LIBTOOL} --mode=link $(CXX)
+ifndef SHARED_LIBRARY
+Relink += -only-static
+endif
 
 #
 # Configure where the item being compiled should go.
 #
 ifdef SHARED_LIBRARY
-Link := $(Link) -rpath $(DESTLIBCURRENT)
+Link += -rpath $(DESTLIBCURRENT)
 endif
 
 ifdef TOOLNAME
-Link := $(Link) -rpath $(DESTTOOLCURRENT)
+Link += -rpath $(DESTTOOLCURRENT)
 endif
 
 # Create dependancy file from CPP file, send to stdout.
index 21d86eb17e7def53f0d175ba461384138805b555..3d89a1c12b418cccf61de1d2fe4cc6370491c53c 100644 (file)
@@ -140,6 +140,11 @@ ifdef SHARED_LIBRARY
 all:: dynamic
 endif
 
+ifdef BYTECODE_LIBRARY
+# if BYTECODE_LIBRARY is specified, the default is to build the bytecode lib
+all:: bytecodelib
+endif
+
 # Default Rule:  Make sure it's also a :: rule
 all ::
 
@@ -167,7 +172,7 @@ prdirs::
 # slightly since GNU Make will not try to find implicit rules for targets
 # which are marked as Phony.
 #
-.PHONY: all dynamic clean distclean install test bytecode prdirs
+.PHONY: all dynamic bytecodelib clean distclean install test bytecode prdirs
 
 ###########################################################################
 # Miscellaneous paths and commands:
@@ -185,8 +190,6 @@ prdirs::
 
 BURG_OPTS = -I
 
-PURIFY := $(PURIFY) -cache-dir="$(BUILD_OBJ_ROOT)/../purifycache" -chain-length="30" -messages=all 
-
 ifdef ENABLE_PROFILING
   ENABLE_OPTIMIZED = 1
   CONFIGURATION := Profile
@@ -265,11 +268,7 @@ PROJTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)
 #
 # Libtool is found in the current directory.
 #
-ifdef VERBOSE
-LIBTOOL=$(LLVM_SRC_ROOT)/mklib
-else
-LIBTOOL=$(LLVM_SRC_ROOT)/mklib --silent
-endif
+LIBTOOL := $(LLVM_SRC_ROOT)/mklib
 
 #
 # If we're not building a shared library, use the disable-shared tag with
@@ -283,7 +282,7 @@ endif
 # versions of libtool.
 #
 ifndef SHARED_LIBRARY
-LIBTOOL := $(LIBTOOL) --tag=disable-shared
+LIBTOOL += --tag=disable-shared
 endif
 
 #
@@ -291,6 +290,7 @@ endif
 #
 ifndef VERBOSE
 VERB := @
+LIBTOOL += --silent
 endif
 
 ###########################################################################
@@ -328,7 +328,6 @@ endif
 # Allow gnu extensions...
 CPPFLAGS += -D_GNU_SOURCE
 
-# -Wno-unused-parameter
 CompileCommonOpts := -Wall -W  -Wwrite-strings -Wno-unused -I$(LEVEL)/include
 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
 
@@ -356,11 +355,7 @@ CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE)
 # Link final executable
 #      (Note that we always link with the C++ compiler).
 #
-ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
-Link     := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static
-else
 Link     := $(LIBTOOL) --mode=link $(CXX)
-endif
 
 # link both projlib and llvmlib libraries
 LinkG    := $(Link) -g -L$(PROJLIBDEBUGSOURCE)  -L$(LLVMLIBDEBUGSOURCE) $(STRIP)
@@ -368,26 +363,20 @@ LinkO    := $(Link) -O3 -L$(PROJLIBRELEASESOURCE) -L$(LLVMLIBRELEASESOURCE)
 LinkP    := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE)
 
 # Create one .o file from a bunch of .o files...
-#ifdef SHARED_LIBRARY
-Relink = ${LIBTOOL} --mode=link $(CXX)
-#else
-Relink = ${LIBTOOL} --mode=link $(CXX) -only-static
-#endif
-
-# MakeSO - Create a .so file from a .o files...
-#MakeSO   := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption)
-#MakeSOO  := $(MakeSO) -O3
-#MakeSOP  := $(MakeSOO) $(PROFILE)
+Relink := ${LIBTOOL} --mode=link $(CXX)
+ifndef SHARED_LIBRARY
+Relink += -only-static
+endif
 
 #
 # Configure where the item being compiled should go.
 #
 ifdef SHARED_LIBRARY
-Link := $(Link) -rpath $(DESTLIBCURRENT)
+Link += -rpath $(DESTLIBCURRENT)
 endif
 
 ifdef TOOLNAME
-Link := $(Link) -rpath $(DESTTOOLCURRENT)
+Link += -rpath $(DESTTOOLCURRENT)
 endif
 
 # Create dependancy file from CPP file, send to stdout.