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
|
|
|
|
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-22 21:02:08 +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-22 21:02:08 +00:00
|
|
|
$(DESTDIR)$(bytecode_libdir)/libcrtend.a: $(CRTEND_A)
|
|
|
|
$(INSTALL) $(CRTEND_A) $(DESTDIR)$(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
|
|
|
|
|
|
|
|
|
|
|
# The four components described in the README
|
2004-08-05 02:28:17 +00:00
|
|
|
Components := main genericeh sjljeh
|
2004-10-22 21:02:08 +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-22 21:02:08 +00:00
|
|
|
$(CRTEND_A) : $(ComponentLibs) $(LIBDIR)/.dir
|
2003-11-29 10:24:57 +00:00
|
|
|
@echo Building final libcrtend.a file from components
|
2004-10-22 21:02:08 +00:00
|
|
|
$(VERB) $(Archive) $@ $(ComponentLibs)
|
2003-11-29 10:05:30 +00:00
|
|
|
|
2004-10-22 21:02:08 +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-22 21:02:08 +00:00
|
|
|
$(OBJDIR)/comp_main.bc: $(MainObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
2004-10-22 21:02:08 +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-22 21:02:08 +00:00
|
|
|
$(OBJDIR)/comp_genericeh.bc: $(GenericEHObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
2004-10-22 21:02:08 +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-22 21:02:08 +00:00
|
|
|
$(OBJDIR)/comp_sjljeh.bc: $(SJLJEHObj)
|
2003-11-29 10:14:17 +00:00
|
|
|
@echo Linking $(notdir $@) component...
|
2004-10-22 21:02:08 +00:00
|
|
|
$(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@
|
2003-08-15 02:20:32 +00:00
|
|
|
|
2003-09-15 15:06:39 +00:00
|
|
|
|