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.
|
|
|
|
#
|
2004-12-02 09:29:49 +00:00
|
|
|
# Since this archive has strange requirements, we use some custom rules for
|
|
|
|
# building it.
|
2003-11-29 09:22:53 +00:00
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
2004-12-02 09:29:49 +00:00
|
|
|
LEVEL=../../..
|
2003-08-15 02:20:32 +00:00
|
|
|
DONT_BUILD_RELINKED=1
|
2004-12-02 09:29:49 +00:00
|
|
|
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
|
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
|
|
|
|
|
2004-12-02 09:29:49 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
MainSrc := crtend.c listend.ll
|
|
|
|
GenericEHSrc := Exception.cpp
|
|
|
|
SJLJEHSrc := SJLJ-Exception.cpp
|
|
|
|
|
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...
|
2004-11-14 22:13:13 +00:00
|
|
|
$(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...
|
2004-11-14 22:13:13 +00:00
|
|
|
$(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...
|
2004-11-14 22:13:13 +00:00
|
|
|
$(Verb) $(GCCLD) -link-as-library \
|
|
|
|
-internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst \
|
|
|
|
$(SJLJEHObj) -o $@
|