1 ##===- tools/edis/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 = EnhancedDisassembly 12 LINK_LIBS_IN_SHARED = 1 13 14 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports 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_COMPONENTS := mcdisassembler 22 23 # If the X86 target is enabled, link in the asmprinter and disassembler. 24 ifneq ($(filter $(TARGETS_TO_BUILD), X86),) 25 LINK_COMPONENTS += x86asmprinter x86disassembler 26 endif 27 28 # If the ARM target is enabled, link in the asmprinter and disassembler. 29 ifneq ($(filter $(TARGETS_TO_BUILD), ARM),) 30 LINK_COMPONENTS += armasmprinter armdisassembler 31 endif 32 33 include $(LEVEL)/Makefile.common 34 35 ifeq ($(HOST_OS),Darwin) 36 # extra options to override libtool defaults 37 LLVMLibsOptions := $(LLVMLibsOptions) \ 38 -Wl,-dead_strip 39 40 ifdef EDIS_VERSION 41 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \ 42 -Wl,-compatibility_version -Wl,1 43 endif 44 45 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line 46 DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') 47 ifneq ($(DARWIN_VERS),8) 48 LLVMLibsOptions := $(LLVMLibsOptions) \ 49 -Wl,-install_name \ 50 -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" 51 endif 52 endif 53 54