2010-05-01 05:51:10 +08:00
|
|
|
##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===##
|
2009-08-27 06:36:44 +08:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
CLANG_LEVEL := ../..
|
2010-05-01 05:51:10 +08:00
|
|
|
LIBRARYNAME = clang
|
2009-08-27 06:36:44 +08:00
|
|
|
|
2010-05-01 05:51:10 +08:00
|
|
|
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
|
2010-04-16 12:45:02 +08:00
|
|
|
|
2009-08-27 06:36:44 +08:00
|
|
|
LINK_LIBS_IN_SHARED = 1
|
|
|
|
SHARED_LIBRARY = 1
|
|
|
|
|
2012-08-09 00:27:29 +08:00
|
|
|
include $(CLANG_LEVEL)/../../Makefile.config
|
2013-06-15 01:17:23 +08:00
|
|
|
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
2014-01-31 09:39:31 +08:00
|
|
|
USEDLIBS = clangIndex.a clangARCMigrate.a \
|
|
|
|
clangRewriteFrontend.a \
|
|
|
|
clangFormat.a \
|
2013-01-07 23:45:20 +08:00
|
|
|
clangTooling.a \
|
2014-01-31 09:39:31 +08:00
|
|
|
clangFrontend.a clangDriver.a \
|
2012-09-01 13:09:24 +08:00
|
|
|
clangSerialization.a \
|
2013-01-07 23:45:20 +08:00
|
|
|
clangParse.a clangSema.a \
|
2013-12-12 10:19:37 +08:00
|
|
|
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
|
2014-01-31 09:39:31 +08:00
|
|
|
clangRewriteCore.a \
|
2013-01-07 23:45:20 +08:00
|
|
|
clangAnalysis.a clangEdit.a \
|
2014-01-31 09:39:31 +08:00
|
|
|
clangASTMatchers.a \
|
2013-01-07 23:45:20 +08:00
|
|
|
clangAST.a clangLex.a clangBasic.a \
|
2009-08-27 06:36:44 +08:00
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/Makefile
|
2009-08-27 06:36:44 +08:00
|
|
|
|
2012-04-16 07:17:25 +08:00
|
|
|
# Add soname to the library.
|
2013-07-01 16:13:34 +08:00
|
|
|
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD))
|
2013-10-29 21:01:41 +08:00
|
|
|
LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
2012-04-16 07:17:25 +08:00
|
|
|
endif
|
|
|
|
|
2009-08-27 06:36:44 +08:00
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
# FIXME: This is copied from the 'lto' makefile. Should we share this?
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
2010-08-20 07:44:02 +08:00
|
|
|
LLVMLibsOptions += -Wl,-compatibility_version,1
|
|
|
|
|
|
|
|
# Set dylib internal version number to submission number.
|
2009-08-27 06:36:44 +08:00
|
|
|
ifdef LLVM_SUBMIT_VERSION
|
2010-08-20 07:44:02 +08:00
|
|
|
LLVMLibsOptions += -Wl,-current_version \
|
|
|
|
-Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
|
2009-08-27 06:36:44 +08:00
|
|
|
endif
|
2010-08-20 07:44:02 +08:00
|
|
|
|
2012-10-04 07:49:57 +08:00
|
|
|
# If we're doing an Apple-style build, add the LTO object path.
|
2013-02-14 03:44:17 +08:00
|
|
|
ifeq ($(RC_XBS),YES)
|
2012-10-10 13:30:49 +08:00
|
|
|
TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/clang-lto.XXXXXX)
|
2013-05-03 06:53:00 +08:00
|
|
|
LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile)
|
2012-10-04 07:49:57 +08:00
|
|
|
endif
|
2009-08-27 06:36:44 +08:00
|
|
|
endif
|