Home | History | Annotate | Download | only in driver
      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 TOOLALIAS = clang++
     13 
     14 ifdef CLANG_ORDER_FILE
     15 TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
     16 endif
     17 
     18 # Include tool version information on OS X.
     19 TOOL_INFO_PLIST := Info.plist
     20 
     21 # Include this here so we can get the configuration of the targets that have
     22 # been configured for construction. We have to do this early so we can set up
     23 # LINK_COMPONENTS before including Makefile.rules
     24 include $(CLANG_LEVEL)/../../Makefile.config
     25 
     26 # Have the option of not supporting plugins. This is important for startup
     27 # performance.
     28 ifeq ($(CLANG_PLUGIN_SUPPORT), 1)
     29 NO_DEAD_STRIP := 1
     30 else
     31 TOOL_NO_EXPORTS := 1
     32 endif
     33 
     34 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
     35                    instrumentation ipo irreader linker objcarcopts option \
     36                    profiledata selectiondag
     37 USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
     38            clangSerialization.a clangCodeGen.a clangParse.a clangSema.a
     39 
     40 ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
     41 USEDLIBS += clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
     42             clangStaticAnalyzerCore.a
     43 endif
     44 
     45 ifeq ($(ENABLE_CLANG_ARCMT),1)
     46 USEDLIBS += clangARCMigrate.a
     47 endif
     48 
     49 ifeq ($(ENABLE_CLANG_REWRITER),1)
     50 USEDLIBS += clangRewriteFrontend.a clangRewriteCore.a
     51 endif
     52 
     53 USEDLIBS += clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangBasic.a
     54 
     55 include $(CLANG_LEVEL)/Makefile
     56 
     57 # Set the tool version information values.
     58 ifeq ($(HOST_OS),Darwin)
     59 ifdef CLANG_VENDOR
     60 TOOL_INFO_NAME := $(CLANG_VENDOR) clang
     61 else
     62 TOOL_INFO_NAME := clang
     63 endif
     64 
     65 ifdef CLANG_VENDOR_UTI
     66 TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
     67 else
     68 TOOL_INFO_UTI := org.llvm.clang
     69 endif
     70 
     71 TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
     72 	$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
     73 ifdef LLVM_SUBMIT_VERSION
     74 TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
     75 else
     76 TOOL_INFO_BUILD_VERSION := 
     77 endif
     78 endif
     79