Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 1 | ##===- tools/driver/Makefile -------------------------------*- Makefile -*-===## |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 2 | # |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 3 | # 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 Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 7 | # |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 8 | ##===----------------------------------------------------------------------===## |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 9 | CLANG_LEVEL := ../.. |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 10 | |
Daniel Dunbar | 7ec3daf | 2009-03-24 03:07:05 +0000 | [diff] [blame] | 11 | TOOLNAME = clang |
Daniel Dunbar | 3f693d2 | 2010-01-18 17:52:48 +0000 | [diff] [blame] | 12 | ifndef CLANG_IS_PRODUCTION |
Daniel Dunbar | f4961da | 2009-11-19 00:21:33 +0000 | [diff] [blame] | 13 | TOOLALIAS = clang++ |
Daniel Dunbar | 5d93ed3 | 2010-04-01 18:21:41 +0000 | [diff] [blame] | 14 | else |
| 15 | ifdef CLANGXX_IS_PRODUCTION |
| 16 | TOOLALIAS = clang++ |
| 17 | endif |
Daniel Dunbar | 3f693d2 | 2010-01-18 17:52:48 +0000 | [diff] [blame] | 18 | endif |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 19 | |
Daniel Dunbar | b08fab8 | 2010-09-10 21:42:03 +0000 | [diff] [blame] | 20 | # We don't currently expect production Clang builds to be interested in |
| 21 | # plugins. This is important for startup performance. |
| 22 | ifdef CLANG_IS_PRODUCTION |
| 23 | TOOL_NO_EXPORTS := 1 |
| 24 | endif |
| 25 | |
Daniel Dunbar | 6dbcaf3 | 2010-09-16 00:42:38 +0000 | [diff] [blame] | 26 | ifdef CLANG_ORDER_FILE |
| 27 | TOOL_ORDER_FILE := $(CLANG_ORDER_FILE) |
| 28 | endif |
| 29 | |
Daniel Dunbar | 7bad56c | 2010-07-15 19:33:44 +0000 | [diff] [blame] | 30 | # Include tool version information on OS X. |
| 31 | TOOL_INFO_PLIST := Info.plist |
| 32 | |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 33 | # Include this here so we can get the configuration of the targets that have |
| 34 | # been configured for construction. We have to do this early so we can set up |
| 35 | # LINK_COMPONENTS before including Makefile.rules |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 36 | include $(CLANG_LEVEL)/../../Makefile.config |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 37 | |
Daniel Dunbar | 4cbbd94 | 2010-06-07 23:27:59 +0000 | [diff] [blame] | 38 | LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \ |
| 39 | ipo selectiondag |
Peter Collingbourne | 1b7255d | 2010-08-24 00:31:22 +0000 | [diff] [blame] | 40 | USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \ |
| 41 | clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \ |
Ted Kremenek | 3a8f40e | 2010-12-23 07:22:02 +0000 | [diff] [blame^] | 42 | clangEntoCheckers.a clangEntoCore.a clangAnalysis.a clangIndex.a clangRewrite.a \ |
Peter Collingbourne | 1b7255d | 2010-08-24 00:31:22 +0000 | [diff] [blame] | 43 | clangAST.a clangLex.a clangBasic.a |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 44 | |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 45 | include $(CLANG_LEVEL)/Makefile |
Daniel Dunbar | f44c585 | 2009-09-22 22:31:13 +0000 | [diff] [blame] | 46 | |
Daniel Dunbar | 7bad56c | 2010-07-15 19:33:44 +0000 | [diff] [blame] | 47 | # Set the tool version information values. |
| 48 | ifeq ($(HOST_OS),Darwin) |
| 49 | ifdef CLANG_VENDOR |
| 50 | TOOL_INFO_NAME := $(CLANG_VENDOR) clang |
| 51 | else |
| 52 | TOOL_INFO_NAME := clang |
| 53 | endif |
| 54 | |
| 55 | ifdef CLANG_VENDOR_UTI |
| 56 | TOOL_INFO_UTI := $(CLANG_VENDOR_UTI) |
| 57 | else |
| 58 | TOOL_INFO_UTI := org.llvm.clang |
| 59 | endif |
| 60 | |
| 61 | TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \ |
| 62 | $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) |
| 63 | ifdef LLVM_SUBMIT_VERSION |
| 64 | TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) |
| 65 | else |
| 66 | TOOL_INFO_BUILD_VERSION := |
| 67 | endif |
| 68 | endif |
| 69 | |
Daniel Dunbar | f44c585 | 2009-09-22 22:31:13 +0000 | [diff] [blame] | 70 | # Translate make variable to define when building a "production" clang. |
| 71 | ifdef CLANG_IS_PRODUCTION |
| 72 | CPP.Defines += -DCLANG_IS_PRODUCTION |
| 73 | endif |
Daniel Dunbar | 5d93ed3 | 2010-04-01 18:21:41 +0000 | [diff] [blame] | 74 | ifdef CLANGXX_IS_PRODUCTION |
| 75 | CPP.Defines += -DCLANGXX_IS_PRODUCTION |
| 76 | endif |