2003-11-29 09:22:53 +00:00
|
|
|
##===- runtime/GCCLibraries/crtend/Makefile ----------------*- Makefile -*-===##
|
2003-10-20 22:29:16 +00:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file was developed by the LLVM research group and is distributed under
|
|
|
|
# the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
2003-11-29 09:22:53 +00:00
|
|
|
#
|
|
|
|
# This directory contains the C and C++ runtime libraries for the LLVM GCC
|
2003-11-29 10:05:30 +00:00
|
|
|
# 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.
|
2003-11-29 09:22:53 +00:00
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
2003-05-14 13:09:41 +00:00
|
|
|
LEVEL = ../../..
|
2003-08-15 02:20:32 +00:00
|
|
|
DONT_BUILD_RELINKED=1
|
2003-05-14 13:09:41 +00:00
|
|
|
|
2004-10-26 07:02:58 +00:00
|
|
|
EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst
|
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
MainSrc := crtend.c listend.ll
|
|
|
|
GenericEHSrc := Exception.cpp
|
|
|
|
SJLJEHSrc := SJLJ-Exception.cpp
|
|
|
|
Source := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) $(CXXEHSrc)
|
2003-05-22 19:50:30 +00:00
|
|
|
|
2003-08-15 02:20:32 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
# CRTEND_A - The result of making 'all' - the final archive file.
|
2004-10-30 09:19:36 +00:00
|
|
|
CRTEND_A = $(LibDir)/libcrtend.a
|
2003-11-29 10:05:30 +00:00
|
|
|
all:: $(CRTEND_A)
|
|
|
|
|
|
|
|
# Installation simply requires copying the archive to it's new home.
|
2004-10-26 21:30:31 +00:00
|
|
|
$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir)
|
2004-10-30 09:19:36 +00:00
|
|
|
$(Echo) Installing $(CRTEND_A)
|
|
|
|
$(Verb) $(INSTALL) $(CRTEND_A) $(bytecode_libdir)
|
2003-11-29 10:05:30 +00:00
|
|
|
|
2004-01-21 23:57:46 +00:00
|
|
|
install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
|
2004-03-11 20:55:23 +00:00
|
|
|
install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
|
2004-10-30 09:19:36 +00:00
|
|
|
# The three components described in the README
|
2004-08-05 02:28:17 +00:00
|
|
|
Components := main genericeh sjljeh
|
2004-10-30 09:19:36 +00:00
|
|
|
ComponentLibs := $(Components:%=$(ObjDir)/comp_%.bc)
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
|
2003-11-29 10:24:57 +00:00
|
|
|
# We build libcrtend.a from the four components described in the README.
|
2004-10-30 09:19:36 +00:00
|
|
|
$(CRTEND_A) : $(ComponentLibs) $(LibDir)/.dir
|
|
|
|
$(Echo) Building final libcrtend.a file from components
|
|
|
|
$(Verb) $(Archive) $@ $(ComponentLibs)
|
2003-11-29 10:05:30 +00:00
|
|
|
|
2004-10-30 09:19:36 +00:00
|
|
|
MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc
|
|
|
|
GenericEHObj := $(ObjDir)/Exception.bc
|
|
|
|
SJLJEHObj := $(ObjDir)/SJLJ-Exception.bc
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
# __main and ctor/dtor support component
|
2004-10-30 09:19:36 +00:00
|
|
|
$(ObjDir)/comp_main.bc: $(MainObj)
|
|
|
|
$(Echo) Linking $(notdir $@) component...
|
|
|
|
$(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst $(MainObj) -o $@
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
# Generic exception handling support runtime.
|
2004-10-30 09:19:36 +00:00
|
|
|
$(ObjDir)/comp_genericeh.bc: $(GenericEHObj)
|
|
|
|
$(Echo) Linking $(notdir $@) component...
|
|
|
|
$(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst $(GenericEHObj) -o $@
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
# setjmp/longjmp exception handling support runtime.
|
2004-10-30 09:19:36 +00:00
|
|
|
$(ObjDir)/comp_sjljeh.bc: $(SJLJEHObj)
|
|
|
|
$(Echo) Linking $(notdir $@) component...
|
|
|
|
$(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@
|