Makefile revision 944eadbf3ffc96389161e9e5d4fb3e6a1ea30e2f
1f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===## 2f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# 3f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# The LLVM Compiler Infrastructure 4f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# 5f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# This file is distributed under the University of Illinois Open Source 6f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# License. See LICENSE.TXT for details. 7f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# 8f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson##===----------------------------------------------------------------------===## 9f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 10f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonCLANG_LEVEL := ../.. 11f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonLIBRARYNAME = clang 12f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 13f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonEXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports 14f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 15f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonLINK_LIBS_IN_SHARED = 1 16f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonSHARED_LIBRARY = 1 17f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 18f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonLINK_COMPONENTS := support mc 19f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonUSEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \ 20f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson clangSema.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a 21f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 22f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsoninclude $(CLANG_LEVEL)/Makefile 23f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 24f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson##===----------------------------------------------------------------------===## 25f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson# FIXME: This is copied from the 'lto' makefile. Should we share this? 26f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson##===----------------------------------------------------------------------===## 27f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 28f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsonifeq ($(HOST_OS),Darwin) 29f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson LLVMLibsOptions += -Wl,-compatibility_version,1 30f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 31f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson # Set dylib internal version number to submission number. 32f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson ifdef LLVM_SUBMIT_VERSION 33f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson LLVMLibsOptions += -Wl,-current_version \ 34f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) 35f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson endif 36dfd8b8327b93660601d016cdc6f29f433b45a8d8Alexander Gutkin 37f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson # Extra options to override libtool defaults. 38f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000 39f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 40f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line 41f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') 42f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson ifneq ($(DARWIN_VERS),8) 43f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson LLVMLibsOptions += -Wl,-install_name \ 44f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" 45f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson endif 46f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsonendif 47f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson