2009-03-03 03:59:07 +08:00
|
|
|
##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
|
2009-12-12 06:20:12 +08:00
|
|
|
#
|
2009-03-03 03:59:07 +08:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2009-12-12 06:20:12 +08:00
|
|
|
#
|
2009-03-03 03:59:07 +08:00
|
|
|
##===----------------------------------------------------------------------===##
|
2010-06-09 04:34:18 +08:00
|
|
|
CLANG_LEVEL := ../..
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2009-03-24 11:07:05 +08:00
|
|
|
TOOLNAME = clang
|
2010-01-19 01:52:48 +08:00
|
|
|
ifndef CLANG_IS_PRODUCTION
|
2009-11-19 08:21:33 +08:00
|
|
|
TOOLALIAS = clang++
|
2010-04-02 02:21:41 +08:00
|
|
|
else
|
|
|
|
ifdef CLANGXX_IS_PRODUCTION
|
|
|
|
TOOLALIAS = clang++
|
|
|
|
endif
|
2010-01-19 01:52:48 +08:00
|
|
|
endif
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2010-07-16 03:33:44 +08:00
|
|
|
# Include tool version information on OS X.
|
|
|
|
TOOL_INFO_PLIST := Info.plist
|
|
|
|
|
2009-12-12 06:20:12 +08:00
|
|
|
# Include this here so we can get the configuration of the targets that have
|
|
|
|
# been configured for construction. We have to do this early so we can set up
|
|
|
|
# LINK_COMPONENTS before including Makefile.rules
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/../../Makefile.config
|
2009-12-12 06:20:12 +08:00
|
|
|
|
2010-06-08 07:27:59 +08:00
|
|
|
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
|
|
|
|
ipo selectiondag
|
2010-08-18 04:43:28 +08:00
|
|
|
USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangCodeGen.a \
|
2010-08-21 02:27:03 +08:00
|
|
|
clangParse.a clangSema.a clangChecker.a clangAnalysis.a \
|
|
|
|
clangIndex.a clangRewrite.a clangAST.a clangLex.a clangBasic.a
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/Makefile
|
2009-09-23 06:31:13 +08:00
|
|
|
|
2010-07-16 03:33:44 +08:00
|
|
|
# Set the tool version information values.
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
|
|
|
ifdef CLANG_VENDOR
|
|
|
|
TOOL_INFO_NAME := $(CLANG_VENDOR) clang
|
|
|
|
else
|
|
|
|
TOOL_INFO_NAME := clang
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CLANG_VENDOR_UTI
|
|
|
|
TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
|
|
|
|
else
|
|
|
|
TOOL_INFO_UTI := org.llvm.clang
|
|
|
|
endif
|
|
|
|
|
|
|
|
TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
|
|
|
|
$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
|
|
|
|
ifdef LLVM_SUBMIT_VERSION
|
|
|
|
TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
|
|
|
|
else
|
|
|
|
TOOL_INFO_BUILD_VERSION :=
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2009-09-23 06:31:13 +08:00
|
|
|
# Translate make variable to define when building a "production" clang.
|
|
|
|
ifdef CLANG_IS_PRODUCTION
|
|
|
|
CPP.Defines += -DCLANG_IS_PRODUCTION
|
|
|
|
endif
|
2010-04-02 02:21:41 +08:00
|
|
|
ifdef CLANGXX_IS_PRODUCTION
|
|
|
|
CPP.Defines += -DCLANGXX_IS_PRODUCTION
|
|
|
|
endif
|