1 ##===- tools/driver/Makefile -------------------------------*- Makefile -*-===## 2 # 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. 7 # 8 ##===----------------------------------------------------------------------===## 9 CLANG_LEVEL := ../.. 10 11 TOOLNAME = clang 12 ifndef CLANG_IS_PRODUCTION 13 TOOLALIAS = clang++ 14 else 15 ifdef CLANGXX_IS_PRODUCTION 16 TOOLALIAS = clang++ 17 endif 18 endif 19 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 26 ifdef CLANG_ORDER_FILE 27 TOOL_ORDER_FILE := $(CLANG_ORDER_FILE) 28 endif 29 30 # Include tool version information on OS X. 31 TOOL_INFO_PLIST := Info.plist 32 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 36 include $(CLANG_LEVEL)/../../Makefile.config 37 38 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \ 39 instrumentation ipo selectiondag 40 USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \ 41 clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \ 42 clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \ 43 clangStaticAnalyzerCore.a \ 44 clangAnalysis.a clangIndex.a clangARCMigrate.a clangRewrite.a \ 45 clangAST.a clangLex.a clangBasic.a 46 47 include $(CLANG_LEVEL)/Makefile 48 49 # Set the tool version information values. 50 ifeq ($(HOST_OS),Darwin) 51 ifdef CLANG_VENDOR 52 TOOL_INFO_NAME := $(CLANG_VENDOR) clang 53 else 54 TOOL_INFO_NAME := clang 55 endif 56 57 ifdef CLANG_VENDOR_UTI 58 TOOL_INFO_UTI := $(CLANG_VENDOR_UTI) 59 else 60 TOOL_INFO_UTI := org.llvm.clang 61 endif 62 63 TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \ 64 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) 65 ifdef LLVM_SUBMIT_VERSION 66 TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) 67 else 68 TOOL_INFO_BUILD_VERSION := 69 endif 70 endif 71 72 # Translate make variable to define when building a "production" clang. 73 ifdef CLANG_IS_PRODUCTION 74 CPP.Defines += -DCLANG_IS_PRODUCTION 75 endif 76 ifdef CLANGXX_IS_PRODUCTION 77 CPP.Defines += -DCLANGXX_IS_PRODUCTION 78 endif 79