1 ##===- tools/ed/Makefile -----------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
11 LIBRARYNAME = EnhancedDisassembly
13 BUILT_SOURCES = EDInfo.inc
15 # Include this here so we can get the configuration of the targets
16 # that have been configured for construction. We have to do this
17 # early so we can set up LINK_COMPONENTS before including Makefile.rules
18 include $(LEVEL)/Makefile.config
20 LINK_LIBS_IN_SHARED = 1
23 LINK_COMPONENTS := $(TARGETS_TO_BUILD) x86asmprinter x86disassembler
25 include $(LEVEL)/Makefile.common
27 ifeq ($(HOST_OS),Darwin)
28 # set dylib internal version number to llvmCore submission number
29 ifdef LLVM_SUBMIT_VERSION
30 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
31 -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
32 -Wl,-compatibility_version -Wl,1
34 # extra options to override libtool defaults
35 LLVMLibsOptions := $(LLVMLibsOptions) \
37 -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \
39 -Wl,-seg1addr -Wl,0xE0000000
41 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
42 DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
43 ifneq ($(DARWIN_VERS),8)
44 LLVMLibsOptions := $(LLVMLibsOptions) \
45 -no-undefined -Wl,-install_name \
46 -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
51 $(Echo) "Building semantic information header"
52 $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null
55 -$(Verb) $(RM) -f EDInfo.inc