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
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
MainSrc := crtend.c listend.ll
|
|
|
|
GenericEHSrc := Exception.cpp
|
|
|
|
SJLJEHSrc := SJLJ-Exception.cpp
|
|
|
|
CXXEHSrc := C++-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.
|
2003-11-29 10:24:57 +00:00
|
|
|
CRTEND_A = $(DESTLIBBYTECODE)/libcrtend.a
|
2003-11-29 10:05:30 +00:00
|
|
|
all:: $(CRTEND_A)
|
|
|
|
|
|
|
|
# Installation simply requires copying the archive to it's new home.
|
2003-11-29 10:24:57 +00:00
|
|
|
$(LLVMGCCDIR)/bytecode-libs/libcrtend.a: $(CRTEND_A)
|
2003-11-29 10:05:30 +00:00
|
|
|
cp $< $@
|
|
|
|
|
2003-11-29 10:24:57 +00:00
|
|
|
install:: $(LLVMGCCDIR)/bytecode-libs/libcrtend.a
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# The four components described in the README
|
|
|
|
Components := main genericeh sjljeh cxxeh
|
|
|
|
ComponentLibs := $(Components:%=$(BUILD_OBJ_DIR)/BytecodeObj/comp_%.bc)
|
|
|
|
|
|
|
|
|
2003-11-29 10:24:57 +00:00
|
|
|
# We build libcrtend.a from the four components described in the README.
|
2003-11-30 09:22:42 +00:00
|
|
|
$(CRTEND_A) : $(ComponentLibs) $(DESTLIBBYTECODE)/.dir
|
2003-11-29 10:24:57 +00:00
|
|
|
@echo Building final libcrtend.a file from components
|
2003-11-29 10:14:17 +00:00
|
|
|
$(VERB) $(AR) $@ $(ComponentLibs)
|
2003-11-29 10:05:30 +00:00
|
|
|
|
|
|
|
MainObj := $(BUILD_OBJ_DIR)/BytecodeObj/crtend.bc \
|
|
|
|
$(BUILD_OBJ_DIR)/BytecodeObj/listend.bc
|
|
|
|
GenericEHObj := $(BUILD_OBJ_DIR)/BytecodeObj/Exception.bc
|
|
|
|
SJLJEHObj := $(BUILD_OBJ_DIR)/BytecodeObj/SJLJ-Exception.bc
|
|
|
|
CXXEHObj := $(BUILD_OBJ_DIR)/BytecodeObj/C++-Exception.bc
|
|
|
|
|
|
|
|
# __main and ctor/dtor support component
|
|
|
|
$(BUILD_OBJ_DIR)/BytecodeObj/comp_main.bc: $(MainObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
|
|
|
$(VERB) $(LGCCLDPROG) -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.
|
|
|
|
$(BUILD_OBJ_DIR)/BytecodeObj/comp_genericeh.bc: $(GenericEHObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
|
|
|
$(VERB) $(LGCCLDPROG) -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.
|
|
|
|
$(BUILD_OBJ_DIR)/BytecodeObj/comp_sjljeh.bc: $(SJLJEHObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
|
|
|
$(VERB) $(LGCCLDPROG) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@
|
2003-08-15 02:20:32 +00:00
|
|
|
|
2003-11-29 10:05:30 +00:00
|
|
|
# C++ exception handling support runtime.
|
|
|
|
$(BUILD_OBJ_DIR)/BytecodeObj/comp_cxxeh.bc: $(CXXEHObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
|
|
|
$(VERB) $(LGCCLDPROG) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_cxxeh.lst $(CXXEHObj) -o $@
|
2003-05-14 13:09:41 +00:00
|
|
|
|
2003-09-15 15:06:39 +00:00
|
|
|
|