Add new tool, lto, to do link time optimization. This tool installs
[oota-llvm.git] / tools / lto / Makefile
1 ##===- tools/lto/Makefile -----------------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file was developed by Devang Patel and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
7
8 ##===----------------------------------------------------------------------===##
9
10 LEVEL = ../..
11 LIBRARYNAME = LLVMlto
12
13 LINK_LIBS_IN_SHARED = 1
14 SHARED_LIBRARY = 1
15 LOADABLE_MODULE = 1
16 DONT_BUILD_RELINKED = 1
17
18 # Include this here so we can get the configuration of the targets
19 # that have been configured for construction. We have to do this 
20 # early so we can set up USEDLIBS properly before includeing Makefile.rules
21 include $(LEVEL)/Makefile.config
22
23 # Initialize the USEDLIBS so we can add to it
24 USEDLIBS :=
25
26 # Check for LLVMCBackend  target
27 ifneq ($(strip $(filter CBackend,$(TARGETS_TO_BUILD))),)
28 USEDLIBS += LLVMCBackend
29 endif
30
31 ifneq ($(strip $(filter Sparc,$(TARGETS_TO_BUILD))),)
32 USEDLIBS += LLVMSparc
33 endif
34
35
36 #Check for X86 Target
37 ifneq ($(strip $(filter X86,$(TARGETS_TO_BUILD))),)
38 USEDLIBS += LLVMX86
39 endif
40
41 #Check for PowerPC Target
42 ifneq ($(strip $(filter PowerPC,$(TARGETS_TO_BUILD))),)
43 USEDLIBS += LLVMPowerPC
44 endif
45
46 #Check for Alpha Target
47 ifneq ($(strip $(filter Alpha,$(TARGETS_TO_BUILD))),)
48 USEDLIBS += LLVMAlpha
49 endif
50
51 #Check for IA64 Target
52 ifneq ($(strip $(filter IA64,$(TARGETS_TO_BUILD))),)
53 USEDLIBS += LLVMIA64
54 endif
55
56 #Check for ARM Target
57 ifneq ($(strip $(filter ARM,$(TARGETS_TO_BUILD))),)
58 USEDLIBS += LLVMARM
59 endif
60
61
62 USEDLIBS += LLVMSelectionDAG.a LLVMCodeGen.a LLVMipo.a \
63 LLVMTransforms.a LLVMScalarOpts.a LLVMipa.a LLVMTransformUtils.a LLVMAnalysis.a \
64 LLVMTarget.a LLVMBCReader.a LLVMBCWriter.a LLVMSystem.a LLVMLinker.a LLVMCore.a \
65 LLVMSupport.a LLVMbzip2.a
66
67 include $(LEVEL)/Makefile.common
68