8aca6efe1a2bebed1b25db0359fc47d3d08f4bea
[oota-llvm.git] / runtime / GCCLibraries / crtend / Makefile.am
1 #===-- runtime/GCCLibraries/crtend/Makefile.am -------------*- Makefile -*--===#
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
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.
7
8 #===------------------------------------------------------------------------===#
9
10 ##===- runtime/GCCLibraries/crtend/Makefile ----------------*- Makefile -*-===##
11
12 #                     The LLVM Compiler Infrastructure
13 #
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.
16
17 ##===----------------------------------------------------------------------===##
18 #
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.
21 #
22 # Since this archive has strange requirements, we use almost all custom rules
23 # for building it.
24 #
25 ##===----------------------------------------------------------------------===##
26
27 include $(top_srcdir)/Makefile_config
28
29 AggregateLib  := $(BCDIR)/libcrtend.a
30 ComponentLibs := comp_main.bc comp_genericeh.bc comp_sjljeh.bc
31
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)
36
37 all-am: $(AggregateLib)
38
39 clean-am: clean-crtend
40
41 clean-crtend:
42         $(RM) -f $(AggregateLib) *.bc
43
44 install-am: install-crtend
45
46 install-crtend:
47         $(INSTALL_DATA) '$(AggregateLib)' $(DESTDIR)$(libdir)
48
49 MainObj      := crtend.bc listend.bc
50 GenericEHObj := Exception.bc
51 SJLJEHObj    := SJLJ-Exception.bc
52
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 $@
57
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 $@
62
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 $@