Ted Kremenek | d2fa566 | 2009-08-26 22:36:44 +0000 | [diff] [blame] | 1 | ##===- tools/CIndex/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 | |
| 10 | LEVEL = ../../../.. |
| 11 | LIBRARYNAME = CIndex |
| 12 | |
| 13 | CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include |
| 14 | CXXFLAGS = -fno-rtti |
| 15 | |
| 16 | # Include this here so we can get the configuration of the targets |
| 17 | # that have been configured for construction. We have to do this |
| 18 | # early so we can set up LINK_COMPONENTS before including Makefile.rules |
| 19 | include $(LEVEL)/Makefile.config |
| 20 | |
| 21 | LINK_LIBS_IN_SHARED = 1 |
| 22 | SHARED_LIBRARY = 1 |
| 23 | |
Ted Kremenek | 80088a9 | 2009-08-28 18:33:53 +0000 | [diff] [blame] | 24 | LINK_COMPONENTS := MC support |
Nuno Lopes | 7896ea1 | 2009-12-02 20:20:47 +0000 | [diff] [blame^] | 25 | USEDLIBS = clangFrontend.a clangDriver.a clangIndex.a clangSema.a clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a |
Ted Kremenek | d2fa566 | 2009-08-26 22:36:44 +0000 | [diff] [blame] | 26 | |
| 27 | include $(LEVEL)/Makefile.common |
| 28 | |
| 29 | ##===----------------------------------------------------------------------===## |
| 30 | # FIXME: This is copied from the 'lto' makefile. Should we share this? |
| 31 | ##===----------------------------------------------------------------------===## |
| 32 | |
| 33 | ifeq ($(HOST_OS),Darwin) |
| 34 | # set dylib internal version number to llvmCore submission number |
| 35 | ifdef LLVM_SUBMIT_VERSION |
| 36 | LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \ |
| 37 | -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \ |
| 38 | -Wl,-compatibility_version -Wl,1 |
| 39 | endif |
| 40 | # extra options to override libtool defaults |
| 41 | LLVMLibsOptions := $(LLVMLibsOptions) \ |
| 42 | -avoid-version \ |
| 43 | -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/CIndex.exports \ |
| 44 | -Wl,-dead_strip \ |
| 45 | -Wl,-seg1addr -Wl,0xE0000000 |
| 46 | |
| 47 | # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line |
| 48 | DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') |
| 49 | ifneq ($(DARWIN_VERS),8) |
| 50 | LLVMLibsOptions := $(LLVMLibsOptions) \ |
| 51 | -no-undefined -Wl,-install_name \ |
| 52 | -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)" |
| 53 | endif |
| 54 | endif |