Oscar Fuentes | 3c00a83 | 2011-01-17 16:35:14 +0000 | [diff] [blame] | 1 | ##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===## |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 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 | |
Daniel Dunbar | 8c39c96 | 2011-10-18 19:27:24 +0000 | [diff] [blame] | 10 | LEVEL := ../.. |
| 11 | LIBRARYNAME := EnhancedDisassembly |
| 12 | LINK_LIBS_IN_SHARED := 1 |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 13 | |
Dan Gohman | 7c52f2e | 2010-04-15 23:08:00 +0000 | [diff] [blame] | 14 | EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports |
Dan Gohman | b16b53b | 2010-04-15 20:54:25 +0000 | [diff] [blame] | 15 | |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 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 | |
Chris Lattner | c510a70 | 2010-07-20 21:26:27 +0000 | [diff] [blame] | 21 | LINK_COMPONENTS := mcdisassembler |
Chris Lattner | 6f2cea0 | 2010-07-20 21:23:57 +0000 | [diff] [blame] | 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 | |
Oscar Fuentes | 3c00a83 | 2011-01-17 16:35:14 +0000 | [diff] [blame] | 28 | # If the ARM target is enabled, link in the asmprinter and disassembler. |
Chris Lattner | 6f2cea0 | 2010-07-20 21:23:57 +0000 | [diff] [blame] | 29 | ifneq ($(filter $(TARGETS_TO_BUILD), ARM),) |
| 30 | LINK_COMPONENTS += armasmprinter armdisassembler |
| 31 | endif |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 32 | |
| 33 | include $(LEVEL)/Makefile.common |
| 34 | |
| 35 | ifeq ($(HOST_OS),Darwin) |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 36 | # extra options to override libtool defaults |
| 37 | LLVMLibsOptions := $(LLVMLibsOptions) \ |
Sean Callanan | eb3a1ab | 2010-04-02 00:53:42 +0000 | [diff] [blame] | 38 | -Wl,-dead_strip |
| 39 | |
| 40 | ifdef EDIS_VERSION |
Sean Callanan | dae9efc | 2010-04-12 20:23:08 +0000 | [diff] [blame] | 41 | LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \ |
Sean Callanan | eb3a1ab | 2010-04-02 00:53:42 +0000 | [diff] [blame] | 42 | -Wl,-compatibility_version -Wl,1 |
| 43 | endif |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 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) \ |
Daniel Dunbar | b259c01 | 2010-07-31 21:32:56 +0000 | [diff] [blame] | 49 | -Wl,-install_name \ |
Sean Callanan | eb3a1ab | 2010-04-02 00:53:42 +0000 | [diff] [blame] | 50 | -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" |
Sean Callanan | bd51cdd | 2010-01-29 01:30:01 +0000 | [diff] [blame] | 51 | endif |
| 52 | endif |
| 53 | |