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