Makefile revision b29d3e73aa23328be00df5d721ef751f4a609c29
1##===- tools/libclang/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
10CLANG_LEVEL := ../..
11LIBRARYNAME = clang
12
13EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
14
15LINK_LIBS_IN_SHARED = 1
16SHARED_LIBRARY = 1
17
18LINK_COMPONENTS := support mc
19USEDLIBS = clangARCMigrate.a clangRewrite.a clangFrontend.a clangDriver.a \
20     clangSerialization.a \
21		 clangParse.a clangSema.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a
22
23include $(CLANG_LEVEL)/Makefile
24
25##===----------------------------------------------------------------------===##
26# FIXME: This is copied from the 'lto' makefile.  Should we share this?
27##===----------------------------------------------------------------------===##
28
29ifeq ($(HOST_OS),Darwin)
30    LLVMLibsOptions += -Wl,-compatibility_version,1
31
32    # Set dylib internal version number to submission number.
33    ifdef LLVM_SUBMIT_VERSION
34        LLVMLibsOptions += -Wl,-current_version \
35                           -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
36    endif
37
38    # Extra options to override libtool defaults.
39    LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000 
40
41    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
42    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
43    ifneq ($(DARWIN_VERS),8)
44       LLVMLibsOptions += -Wl,-install_name \
45                          -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
46    endif
47endif
48