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