Updated the install location for EnhancedDisassembly
[oota-llvm.git] / tools / edis / Makefile
1 ##===- tools/ed/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
13 BUILT_SOURCES = EDInfo.inc
14
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
19
20 LINK_LIBS_IN_SHARED = 1
21 SHARED_LIBRARY = 1
22
23 LINK_COMPONENTS := $(TARGETS_TO_BUILD) x86asmprinter x86disassembler
24
25 include $(LEVEL)/Makefile.common
26
27 ifeq ($(HOST_OS),Darwin)
28     # extra options to override libtool defaults 
29     LLVMLibsOptions    := $(LLVMLibsOptions)  \
30                          -avoid-version \
31                          -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \
32                          -Wl,-dead_strip
33
34     ifdef EDIS_VERSION
35         LLVMLibsOptions    := -Wl,-current_version -Wl,$(EDIS_VERSION) \
36                               -Wl,-compatibility_version -Wl,1
37     endif
38
39     # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
40     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
41     ifneq ($(DARWIN_VERS),8)
42        LLVMLibsOptions    := $(LLVMLibsOptions)  \
43                             -no-undefined -Wl,-install_name \
44                             -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
45     endif
46 endif
47
48 EDInfo.inc:     $(TBLGEN)
49         $(Echo) "Building semantic information header"
50         $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null
51
52 clean::
53         -$(Verb) $(RM) -f EDInfo.inc