[llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile

Reid Spencer reid at x10sys.com
Thu Dec 2 01:30:00 PST 2004



Changes in directory llvm/runtime/GCCLibraries/crtend:

Makefile updated: 1.20 -> 1.21
---
Log message:

For PR466: http://llvm.cs.uiuc.edu/PR466 :
Much of what this Makefile did to make a libcrtend.a file is now supported
by Makefile.rules when BYTECODE_LIBRARY=1 is specified. So, we've 
simplified the make rules for building this library.


---
Diffs of the changes:  (+14 -31)

Index: llvm/runtime/GCCLibraries/crtend/Makefile
diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.20 llvm/runtime/GCCLibraries/crtend/Makefile:1.21
--- llvm/runtime/GCCLibraries/crtend/Makefile:1.20	Sun Nov 14 16:13:13 2004
+++ llvm/runtime/GCCLibraries/crtend/Makefile	Thu Dec  2 03:29:49 2004
@@ -10,47 +10,30 @@
 # This directory contains the C and C++ runtime libraries for the LLVM GCC
 # front-ends.  See the README.txt file for more details.
 #
-# Since this archive has strange requirements, we use almost all custom rules
-# for building it.
+# Since this archive has strange requirements, we use some custom rules for 
+# building it.
 #
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../../..
+LEVEL=../../..
 DONT_BUILD_RELINKED=1
+BYTECODE_LIBRARY=1
+LIBRARYNAME=crtend
+
+# Note: We're fooling Makefile.rules here. The sources listed don't exist but
+# it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of
+# object files to put in the library. Since we've specified BYTECODE_LIBRARY
+# above, it changes the .c suffix to .bc suffix. Below are rules to build 
+# each of those bytecode objects from the sources we do have in this directory.
+SOURCES=comp_main.c comp_genericeh.c comp_sjljeh.c
 
 EXTRA_DIST   := comp_main.lst comp_genericeh.lst comp_sjljeh.lst
 
+include $(LEVEL)/Makefile.common
+
 MainSrc      := crtend.c listend.ll
 GenericEHSrc := Exception.cpp
 SJLJEHSrc    := SJLJ-Exception.cpp
-Source       := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) $(CXXEHSrc)
-
-include $(LEVEL)/Makefile.common
-
-# CRTEND_A - The result of making 'all' - the final archive file.
-CRTEND_A   = $(LibDir)/libcrtend.a
-all:: $(CRTEND_A)
-
-# Installation simply requires copying the archive to it's new home.
-$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir)
-	$(Echo) Installing $(CRTEND_A)
-	$(Verb) $(INSTALL) $(CRTEND_A) $(bytecode_libdir)
-
-install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
-install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
-
-clean-local::
-	$(Verb)$(RM) -f $(CRTEND_A)
-
-# The three components described in the README
-Components := main genericeh sjljeh
-ComponentLibs := $(Components:%=$(ObjDir)/comp_%.bc)
-
-
-# We build libcrtend.a from the four components described in the README.
-$(CRTEND_A) : $(ComponentLibs) $(LibDir)/.dir
-	$(Echo) Building final libcrtend.a file from components
-	$(Verb) $(LArchive) $@ $(ComponentLibs)
 
 MainObj      := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc
 GenericEHObj := $(ObjDir)/Exception.bc






More information about the llvm-commits mailing list