1 #===-- runtime/GCCLibraries/crtend/Makefile.am -------------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file was developed by Reid Spencer and is distributed under the
6 # University of Illinois Open Source License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 ##===- runtime/GCCLibraries/crtend/Makefile ----------------*- Makefile -*-===##
12 # The LLVM Compiler Infrastructure
14 # This file was developed by the LLVM research group and is distributed under
15 # the University of Illinois Open Source License. See LICENSE.TXT for details.
17 ##===----------------------------------------------------------------------===##
19 # This directory contains the C and C++ runtime libraries for the LLVM GCC
20 # front-ends. See the README.txt file for more details.
22 # Since this archive has strange requirements, we use almost all custom rules
25 ##===----------------------------------------------------------------------===##
27 include $(top_srcdir)/Makefile_config
29 AggregateLib := $(BCDIR)/libcrtend.a
30 ComponentLibs := comp_main.bc comp_genericeh.bc comp_sjljeh.bc
32 ## We build libcrtend.a from the four components described in the README.
33 $(AggregateLib) : $(BCDIR) $(ComponentLibs)
34 @echo Building final libcrtend.a file from bytecode components
35 $(AR) cr $(BCDIR)/libcrtend.a $(ComponentLibs)
37 all-am: $(AggregateLib)
39 clean-am: clean-crtend
42 $(RM) -f $(AggregateLib) *.bc
44 install-am: install-crtend
47 $(INSTALL_DATA) '$(AggregateLib)' $(DESTDIR)$(libdir)
49 MainObj := crtend.bc listend.bc
50 GenericEHObj := Exception.bc
51 SJLJEHObj := SJLJ-Exception.bc
53 # __main and ctor/dtor support component
54 comp_main.bc: $(MainObj)
55 @echo Linking $(notdir $@) component...
56 $(LLVMGCCLD) -link-as-library -internalize-public-api-file=$(srcdir)/comp_main.lst $(MainObj) -o $@
58 # Generic exception handling support runtime.
59 comp_genericeh.bc: $(GenericEHObj)
60 @echo Linking $(notdir $@) component...
61 $(LLVMGCCLD) -link-as-library -internalize-public-api-file=$(srcdir)/comp_genericeh.lst $(GenericEHObj) -o $@
63 # setjmp/longjmp exception handling support runtime.
64 comp_sjljeh.bc: $(SJLJEHObj)
65 @echo Linking $(notdir $@) component...
66 $(LLVMGCCLD) -link-as-library -internalize-public-api-file=$(srcdir)/comp_sjljeh.lst $(SJLJEHObj) -o $@