blob: f07b0f2c92f73fa12185159f89c57e7e5a28fca7 [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##===----------------------------------------------------------------------===##
Daniel Dunbarafed0992010-06-08 20:34:18 +00009CLANG_LEVEL := ../..
Daniel Dunbar3ede8d02009-03-02 19:59:07 +000010
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000011TOOLNAME = clang
Daniel Dunbarf4961da2009-11-19 00:21:33 +000012TOOLALIAS = clang++
Daniel Dunbar3ede8d02009-03-02 19:59:07 +000013
Daniel Dunbarb08fab82010-09-10 21:42:03 +000014# We don't currently expect production Clang builds to be interested in
15# plugins. This is important for startup performance.
16ifdef CLANG_IS_PRODUCTION
17TOOL_NO_EXPORTS := 1
18endif
19
Daniel Dunbar6dbcaf32010-09-16 00:42:38 +000020ifdef CLANG_ORDER_FILE
21TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
22endif
23
Daniel Dunbar7bad56c2010-07-15 19:33:44 +000024# Include tool version information on OS X.
25TOOL_INFO_PLIST := Info.plist
26
Daniel Dunbar21085772009-12-11 22:20:12 +000027# Include this here so we can get the configuration of the targets that have
28# been configured for construction. We have to do this early so we can set up
29# LINK_COMPONENTS before including Makefile.rules
Daniel Dunbarafed0992010-06-08 20:34:18 +000030include $(CLANG_LEVEL)/../../Makefile.config
Daniel Dunbar3ede8d02009-03-02 19:59:07 +000031
Daniel Dunbar4cbbd942010-06-07 23:27:59 +000032LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
Peter Collingbourne22a7dfe2011-10-30 17:30:44 +000033 instrumentation ipo linker selectiondag
Peter Collingbourne1b7255d2010-08-24 00:31:22 +000034USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
35 clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
Argyrios Kyrtzidise8177712011-02-14 18:13:01 +000036 clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
37 clangStaticAnalyzerCore.a \
Ted Kremenek305c6132012-09-01 05:09:24 +000038 clangAnalysis.a clangARCMigrate.a \
Ted Kremenek21930122012-09-01 06:20:25 +000039 clangRewriteFrontend.a clangRewriteCore.a \
Chandler Carruthf95d4122012-06-20 09:53:52 +000040 clangEdit.a clangAST.a clangLex.a clangBasic.a
Daniel Dunbar21085772009-12-11 22:20:12 +000041
Daniel Dunbarafed0992010-06-08 20:34:18 +000042include $(CLANG_LEVEL)/Makefile
Daniel Dunbarf44c5852009-09-22 22:31:13 +000043
Daniel Dunbar7bad56c2010-07-15 19:33:44 +000044# Set the tool version information values.
45ifeq ($(HOST_OS),Darwin)
46ifdef CLANG_VENDOR
47TOOL_INFO_NAME := $(CLANG_VENDOR) clang
48else
49TOOL_INFO_NAME := clang
50endif
51
52ifdef CLANG_VENDOR_UTI
53TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
54else
55TOOL_INFO_UTI := org.llvm.clang
56endif
57
58TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
59 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
60ifdef LLVM_SUBMIT_VERSION
61TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
62else
63TOOL_INFO_BUILD_VERSION :=
64endif
65endif
66
Daniel Dunbarf44c5852009-09-22 22:31:13 +000067# Translate make variable to define when building a "production" clang.
68ifdef CLANG_IS_PRODUCTION
69CPP.Defines += -DCLANG_IS_PRODUCTION
Eli Friedman3963cef2011-06-28 00:03:31 +000070endif