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:58:09 +00:00
|
|
|
LEVEL = ../../..
|
|
|
|
DONT_BUILD_RELINKED = 1
|
|
|
|
BYTECODE_LIBRARY = 1
|
|
|
|
LIBRARYNAME = crtend
|
2004-12-22 05:57:33 +00:00
|
|
|
BYTECODE_DESTINATION = $(CFERuntimeLibDir)
|
2004-12-02 09:29:49 +00:00
|
|
|
|
2004-12-04 22:34:33 +00:00
|
|
|
# Note: We're using FAKE_SOURCES because the comp_*.c don't really exists.
|
|
|
|
# However this makefile builds comp_*.bc and that's what we want in the library.
|
|
|
|
# The FAKE_SOURCES variable supports this kind of construction. It uses the
|
|
|
|
# FAKE_SOURCES to determine a list of things to build, but doesn't use
|
|
|
|
# FAKE_SOURCES for dependencies, distribution, etc. It is assumed the makefile
|
|
|
|
# will know how to build the objects eventhough the sources don't exist.
|
2003-05-14 13:09:41 +00:00
|
|
|
|
2004-12-04 22:34:33 +00:00
|
|
|
FAKE_SOURCES := comp_main.c comp_genericeh.c comp_sjljeh.c
|
2004-12-02 09:29:49 +00:00
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
MainSrc := crtend.c listend.ll
|
|
|
|
GenericEHSrc := Exception.cpp
|
|
|
|
SJLJEHSrc := SJLJ-Exception.cpp
|
|
|
|
|
2004-12-04 22:34:33 +00:00
|
|
|
EXTRA_DIST := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) \
|
|
|
|
comp_main.lst comp_genericeh.lst comp_sjljeh.lst
|
|
|
|
|
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
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 \
|
2004-12-08 04:22:47 +00:00
|
|
|
$(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 \
|
2004-12-08 04:22:47 +00:00
|
|
|
$(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 \
|
2004-12-08 04:22:47 +00:00
|
|
|
$(SJLJEHObj) -o $@
|