Makefile revision 43c40ffa41e4a9f96fb8b47a3e7c0c42c5421fa6
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
10LEVEL = ../..
11TOOLNAME = 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
16include $(LEVEL)/Makefile.config
17
18# Initialize the USEDLIBS so we can add to it
19USEDLIBS :=
20
21# Check for LLVMCBackend  target
22ifneq ($(strip $(filter CBackend,$(TARGETS_TO_BUILD))),)
23USEDLIBS += LLVMCBackend
24endif
25
26ifneq ($(strip $(filter Sparc,$(TARGETS_TO_BUILD))),)
27USEDLIBS += LLVMSparc
28endif
29
30
31#Check for X86 Target
32ifneq ($(strip $(filter X86,$(TARGETS_TO_BUILD))),)
33USEDLIBS += LLVMX86
34endif
35
36#Check for PowerPC Target
37ifneq ($(strip $(filter PowerPC,$(TARGETS_TO_BUILD))),)
38USEDLIBS += LLVMPowerPC
39endif
40
41#Check for Alpha Target
42ifneq ($(strip $(filter Alpha,$(TARGETS_TO_BUILD))),)
43USEDLIBS += LLVMAlpha
44endif
45
46#Check for IA64 Target
47ifneq ($(strip $(filter IA64,$(TARGETS_TO_BUILD))),)
48USEDLIBS += LLVMIA64
49endif
50
51USEDLIBS += \
52	LLVMSelectionDAG \
53	LLVMCodeGen \
54	LLVMTarget.a \
55	LLVMipa.a \
56	LLVMTransforms.a \
57	LLVMScalarOpts.a \
58	LLVMTransformUtils.a \
59	LLVMAnalysis.a \
60	LLVMBCReader \
61	LLVMBCWriter \
62	LLVMCore \
63	LLVMSupport.a \
64	LLVMbzip2 \
65	LLVMSystem.a
66
67include $(LLVM_SRC_ROOT)/Makefile.rules
68
69