blob: ac98730328f880874a1077c98c6fd4e75fce19ee [file] [log] [blame]
Daniel Dunbar3ede8d02009-03-02 19:59:07 +00001##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
Daniel Dunbar21085772009-12-11 22:20:12 +00002#
Daniel Dunbar3ede8d02009-03-02 19:59:07 +00003# The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Daniel Dunbar21085772009-12-11 22:20:12 +00007#
Daniel Dunbar3ede8d02009-03-02 19:59:07 +00008##===----------------------------------------------------------------------===##
9LEVEL = ../../../..
10
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000011TOOLNAME = clang
Daniel Dunbar3f693d22010-01-18 17:52:48 +000012ifndef CLANG_IS_PRODUCTION
Daniel Dunbarf4961da2009-11-19 00:21:33 +000013TOOLALIAS = clang++
Daniel Dunbar5d93ed32010-04-01 18:21:41 +000014else
15 ifdef CLANGXX_IS_PRODUCTION
16 TOOLALIAS = clang++
17 endif
Daniel Dunbar3f693d22010-01-18 17:52:48 +000018endif
Jeffrey Yasskin33524062010-03-12 22:55:16 +000019CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
Daniel Dunbar3ede8d02009-03-02 19:59:07 +000020
Daniel Dunbar21085772009-12-11 22:20:12 +000021# Clang tool has no plugins, optimize startup time.
Daniel Dunbar073777f2009-03-24 03:00:12 +000022TOOL_NO_EXPORTS = 1
23
Daniel Dunbar21085772009-12-11 22:20:12 +000024# Include this here so we can get the configuration of the targets that have
25# been configured for construction. We have to do this early so we can set up
26# LINK_COMPONENTS before including Makefile.rules
27include $(LEVEL)/Makefile.config
Daniel Dunbar3ede8d02009-03-02 19:59:07 +000028
Daniel Dunbar4cbbd942010-06-07 23:27:59 +000029LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
30 ipo selectiondag
Zhongxing Xu0c986702010-01-29 03:25:47 +000031USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
32 clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
Ted Kremenek1309f9a2010-01-25 04:41:41 +000033 clangParse.a clangLex.a clangBasic.a
Daniel Dunbar21085772009-12-11 22:20:12 +000034
35include $(LLVM_SRC_ROOT)/Makefile.rules
Daniel Dunbarf44c5852009-09-22 22:31:13 +000036
37# Translate make variable to define when building a "production" clang.
38ifdef CLANG_IS_PRODUCTION
39CPP.Defines += -DCLANG_IS_PRODUCTION
40endif
Daniel Dunbar5d93ed32010-04-01 18:21:41 +000041ifdef CLANGXX_IS_PRODUCTION
42CPP.Defines += -DCLANGXX_IS_PRODUCTION
43endif