~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to runtime/libprofile/Makefile

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##===- runtime/libprofile/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
include $(LEVEL)/Makefile.config
 
12
 
 
13
ifneq ($(strip $(LLVMCC)),)
 
14
BYTECODE_LIBRARY = 1
 
15
endif
 
16
LIBRARYNAME = profile_rt
 
17
LINK_LIBS_IN_SHARED = 1
 
18
SHARED_LIBRARY = 1
 
19
EXTRA_DIST = libprofile.exports
 
20
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libprofile.exports
 
21
 
 
22
# Build and install this archive.                                                                                                                  
 
23
BUILD_ARCHIVE = 1
 
24
override NO_INSTALL_ARCHIVES =
 
25
 
 
26
include $(LEVEL)/Makefile.common
 
27
 
 
28
ifeq ($(HOST_OS),Darwin)
 
29
    # Special hack to allow libprofile_rt to have an offset version number.
 
30
    PROFILE_RT_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
 
31
 
 
32
    # Set dylib internal version number to llvmCore submission number.
 
33
    ifdef LLVM_SUBMIT_VERSION
 
34
        LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
 
35
                        -Wl,$(PROFILE_RT_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
 
36
                        -Wl,-compatibility_version -Wl,1
 
37
    endif
 
38
    # Extra options to override libtool defaults.
 
39
    LLVMLibsOptions    := $(LLVMLibsOptions)  \
 
40
                         -Wl,-dead_strip \
 
41
                         -Wl,-seg1addr -Wl,0xE0000000 
 
42
 
 
43
    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on
 
44
    # command line.
 
45
    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
 
46
    ifneq ($(DARWIN_VERS),8)
 
47
       LLVMLibsOptions    := $(LLVMLibsOptions)  \
 
48
                            -Wl,-install_name \
 
49
                            -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
 
50
    endif
 
51
endif