xref: /minix3/external/bsd/llvm/dist/clang/tools/libclang/Makefile (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===##
2f4a2713aSLionel Sambuc#
3f4a2713aSLionel Sambuc#                     The LLVM Compiler Infrastructure
4f4a2713aSLionel Sambuc#
5f4a2713aSLionel Sambuc# This file is distributed under the University of Illinois Open Source
6f4a2713aSLionel Sambuc# License. See LICENSE.TXT for details.
7f4a2713aSLionel Sambuc#
8f4a2713aSLionel Sambuc##===----------------------------------------------------------------------===##
9f4a2713aSLionel Sambuc
10f4a2713aSLionel SambucCLANG_LEVEL := ../..
11f4a2713aSLionel SambucLIBRARYNAME = clang
12f4a2713aSLionel Sambuc
13f4a2713aSLionel SambucEXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
14f4a2713aSLionel Sambuc
15f4a2713aSLionel SambucLINK_LIBS_IN_SHARED = 1
16f4a2713aSLionel SambucSHARED_LIBRARY = 1
17f4a2713aSLionel Sambuc
18f4a2713aSLionel Sambucinclude $(CLANG_LEVEL)/../../Makefile.config
19*0a6a1f1dSLionel SambucLINK_COMPONENTS := AsmParser BitReader Core MC MCParser Option Support
20*0a6a1f1dSLionel SambucUSEDLIBS = clangIndex.a clangARCMigrate.a \
21*0a6a1f1dSLionel Sambuc	   clangRewriteFrontend.a \
22*0a6a1f1dSLionel Sambuc	   clangFormat.a \
23*0a6a1f1dSLionel Sambuc	   clangTooling.a clangToolingCore.a \
24*0a6a1f1dSLionel Sambuc	   clangFrontend.a clangDriver.a \
25f4a2713aSLionel Sambuc	   clangSerialization.a \
26f4a2713aSLionel Sambuc	   clangParse.a clangSema.a \
27*0a6a1f1dSLionel Sambuc	   clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
28*0a6a1f1dSLionel Sambuc	   clangRewrite.a \
29f4a2713aSLionel Sambuc	   clangAnalysis.a clangEdit.a \
30*0a6a1f1dSLionel Sambuc	   clangASTMatchers.a \
31f4a2713aSLionel Sambuc	   clangAST.a clangLex.a clangBasic.a \
32f4a2713aSLionel Sambuc
33f4a2713aSLionel Sambucinclude $(CLANG_LEVEL)/Makefile
34f4a2713aSLionel Sambuc
35f4a2713aSLionel Sambuc# Add soname to the library.
36f4a2713aSLionel Sambucifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD))
37f4a2713aSLionel Sambuc        LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
38f4a2713aSLionel Sambucendif
39f4a2713aSLionel Sambuc
40*0a6a1f1dSLionel Sambucifeq ($(ENABLE_CLANG_ARCMT),1)
41*0a6a1f1dSLionel Sambuc  CXX.Flags += -DCLANG_ENABLE_ARCMT
42*0a6a1f1dSLionel Sambucendif
43*0a6a1f1dSLionel Sambuc
44f4a2713aSLionel Sambuc##===----------------------------------------------------------------------===##
45f4a2713aSLionel Sambuc# FIXME: This is copied from the 'lto' makefile.  Should we share this?
46f4a2713aSLionel Sambuc##===----------------------------------------------------------------------===##
47f4a2713aSLionel Sambuc
48f4a2713aSLionel Sambucifeq ($(HOST_OS),Darwin)
49f4a2713aSLionel Sambuc    LLVMLibsOptions += -Wl,-compatibility_version,1
50f4a2713aSLionel Sambuc
51f4a2713aSLionel Sambuc    # Set dylib internal version number to submission number.
52f4a2713aSLionel Sambuc    ifdef LLVM_SUBMIT_VERSION
53f4a2713aSLionel Sambuc        LLVMLibsOptions += -Wl,-current_version \
54f4a2713aSLionel Sambuc                           -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
55f4a2713aSLionel Sambuc    endif
56f4a2713aSLionel Sambuc
57f4a2713aSLionel Sambuc    # If we're doing an Apple-style build, add the LTO object path.
58f4a2713aSLionel Sambuc    ifeq ($(RC_XBS),YES)
59f4a2713aSLionel Sambuc       TempFile        := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/clang-lto.XXXXXX)
60f4a2713aSLionel Sambuc       LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile)
61f4a2713aSLionel Sambuc    endif
62f4a2713aSLionel Sambucendif
63