1e5036700648bee5376c2902175c281f2cd2f8d5
[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 SparcV8,$(TARGETS_TO_BUILD))),)
33 USEDLIBS += \
34         LLVMSparcV9ModuloSched \
35         LLVMSparcV8 \
36         LLVMSparcV9 \
37         LLVMSparcV9RegAlloc \
38         LLVMSparcV9InstrSched \
39         LLVMSparcV9LiveVar
40 endif
41
42 #Check for X86 Target
43 ifneq ($(strip $(filter X86,$(TARGETS_TO_BUILD))),)
44 USEDLIBS += LLVMX86
45 endif
46
47 #Check for PowerPC Target
48 ifneq ($(strip $(filter PowerPC,$(TARGETS_TO_BUILD))),)
49 USEDLIBS += LLVMPowerPC
50 endif
51
52 #Check for Alpha Target
53 ifneq ($(strip $(filter Alpha,$(TARGETS_TO_BUILD))),)
54 USEDLIBS += LLVMAlpha
55 endif
56
57 #Check for IA64 Target
58 ifneq ($(strip $(filter IA64,$(TARGETS_TO_BUILD))),)
59 USEDLIBS += LLVMIA64
60 endif
61
62 USEDLIBS += \
63         LLVMSelectionDAG \
64         LLVMCodeGen \
65         LLVMTarget.a \
66         LLVMipa.a \
67         LLVMTransforms.a \
68         LLVMScalarOpts \
69         LLVMAnalysis.a \
70         LLVMTransformUtils.a \
71         LLVMBCReader \
72         LLVMBCWriter \
73         LLVMCore \
74         LLVMSupport.a \
75         LLVMbzip2 \
76         LLVMSystem.a
77
78 include $(LLVM_SRC_ROOT)/Makefile.rules
79