1 ##===- runtime/GCCLibraries/crtend/Makefile ----------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 # This directory contains the C and C++ runtime libraries for the LLVM GCC
11 # front-ends. See the README.txt file for more details.
13 # Since this archive has strange requirements, we use some custom rules for
16 ##===----------------------------------------------------------------------===##
19 DONT_BUILD_RELINKED = 1
23 # Note: We're fooling Makefile.rules here. The sources listed don't exist but
24 # it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of
25 # object files to put in the library. Since we've specified BYTECODE_LIBRARY
26 # above, it changes the .c suffix to .bc suffix. Below are rules to build
27 # each of those bytecode objects from the sources we do have in this directory.
28 SOURCES = comp_main.c comp_genericeh.c comp_sjljeh.c
30 EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst
32 include $(LEVEL)/Makefile.common
34 MainSrc := crtend.c listend.ll
35 GenericEHSrc := Exception.cpp
36 SJLJEHSrc := SJLJ-Exception.cpp
38 MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc
39 GenericEHObj := $(ObjDir)/Exception.bc
40 SJLJEHObj := $(ObjDir)/SJLJ-Exception.bc
42 # __main and ctor/dtor support component
43 $(ObjDir)/comp_main.bc: $(MainObj)
44 $(Echo) Linking $(notdir $@) component...
45 $(Verb) $(GCCLD) -link-as-library \
46 -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst \
49 # Generic exception handling support runtime.
50 $(ObjDir)/comp_genericeh.bc: $(GenericEHObj)
51 $(Echo) Linking $(notdir $@) component...
52 $(Verb) $(GCCLD) -link-as-library \
53 -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst \
56 # setjmp/longjmp exception handling support runtime.
57 $(ObjDir)/comp_sjljeh.bc: $(SJLJEHObj)
58 $(Echo) Linking $(notdir $@) component...
59 $(Verb) $(GCCLD) -link-as-library \
60 -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst \