handle labeldecls.
[clang.git] / tools / libclang / Makefile
blob6d2a13cfc0b4d2ec67ab198965cc7b33d02a2f66
1 ##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===##
2 #
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
7 #
8 ##===----------------------------------------------------------------------===##
10 CLANG_LEVEL := ../..
11 LIBRARYNAME = clang
13 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
15 LINK_LIBS_IN_SHARED = 1
16 SHARED_LIBRARY = 1
18 LINK_COMPONENTS := bitreader mc core
19 USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
20 clangSema.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a
22 include $(CLANG_LEVEL)/Makefile
24 ##===----------------------------------------------------------------------===##
25 # FIXME: This is copied from the 'lto' makefile. Should we share this?
26 ##===----------------------------------------------------------------------===##
28 ifeq ($(HOST_OS),Darwin)
29 LLVMLibsOptions += -Wl,-compatibility_version,1
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
37 # Extra options to override libtool defaults.
38 LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000
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
46 endif