56cc3031a11ce3478686c9e5ab00be6d59225630
[oota-llvm.git] / tools / llc / Makefile
1 #===- tools/llc/Makefile -----------------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
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.
7
8 ##===----------------------------------------------------------------------===##
9
10 LEVEL = ../..
11 TOOLNAME = llc
12
13 # Include this here so we can get the configuration of the targets
14 # that have been configured for construction. We have to do this 
15 # early so we can set up USEDLIBS properly before includeing Makefile.rules
16 include $(LEVEL)/Makefile.config
17
18 # Initialize the USEDLIBS so we can add to it
19 USEDLIBS :=
20
21 # Check for LLVMCBackend  target
22 ifneq ($(strip $(filter CBackend,$(TARGETS_TO_BUILD))),)
23 USEDLIBS += LLVMCBackend
24 endif
25
26 # Check for Skeleton target
27 ifneq ($(strip $(filter Skeleton,$(TARGETS_TO_BUILD))),)
28 USEDLIB += LLVMSkeleton
29 endif
30
31 # Check for Sparc target
32 ifneq ($(strip $(filter SparcV9,$(TARGETS_TO_BUILD))),)
33 USEDLIBS += \
34         LLVMSparcV9ModuloSched \
35         LLVMSparcV9 \
36         LLVMSparcV9RegAlloc \
37         LLVMSparcV9InstrSched \
38         LLVMSparcV9LiveVar
39 endif
40
41 ifneq ($(strip $(filter SparcV8,$(TARGETS_TO_BUILD))),)
42 USEDLIBS += LLVMSparcV8
43 endif
44
45
46 #Check for X86 Target
47 ifneq ($(strip $(filter X86,$(TARGETS_TO_BUILD))),)
48 USEDLIBS += LLVMX86
49 endif
50
51 #Check for PowerPC Target
52 ifneq ($(strip $(filter PowerPC,$(TARGETS_TO_BUILD))),)
53 USEDLIBS += LLVMPowerPC
54 endif
55
56 #Check for Alpha Target
57 ifneq ($(strip $(filter Alpha,$(TARGETS_TO_BUILD))),)
58 USEDLIBS += LLVMAlpha
59 endif
60
61 #Check for IA64 Target
62 ifneq ($(strip $(filter IA64,$(TARGETS_TO_BUILD))),)
63 USEDLIBS += LLVMIA64
64 endif
65
66 USEDLIBS += \
67         LLVMSelectionDAG \
68         LLVMCodeGen \
69         LLVMTarget.a \
70         LLVMipa.a \
71         LLVMTransforms.a \
72         LLVMScalarOpts.a \
73         LLVMAnalysis.a \
74         LLVMTransformUtils.a \
75         LLVMBCReader \
76         LLVMBCWriter \
77         LLVMCore \
78         LLVMSupport.a \
79         LLVMbzip2 \
80         LLVMSystem.a
81
82 include $(LLVM_SRC_ROOT)/Makefile.rules
83