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 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports
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
22 ifeq ($(ENABLE_PIC),1)
23 ifneq ($(DISABLE_EDIS),1)
24 ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
25 LINK_LIBS_IN_SHARED = 1
31 LINK_COMPONENTS := $(TARGETS_TO_BUILD) x86asmprinter x86disassembler
33 include $(LEVEL)/Makefile.common
35 ifeq ($(HOST_OS),Darwin)
36 # extra options to override libtool defaults
37 LLVMLibsOptions := $(LLVMLibsOptions) \
42 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \
43 -Wl,-compatibility_version -Wl,1
46 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
47 DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
48 ifneq ($(DARWIN_VERS),8)
49 LLVMLibsOptions := $(LLVMLibsOptions) \
50 -no-undefined -Wl,-install_name \
51 -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
56 $(Echo) "Building semantic information header"
57 $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null
60 -$(Verb) $(RM) -f EDInfo.inc