blob: 39a5cf72731c31380457aa2179dbc61e19d0dcf3 [file] [log] [blame]
Oscar Fuentes3c00a832011-01-17 16:35:14 +00001##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===##
Sean Callananbd51cdd2010-01-29 01:30:01 +00002#
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 Dunbar8c39c962011-10-18 19:27:24 +000010LEVEL := ../..
11LIBRARYNAME := EnhancedDisassembly
12LINK_LIBS_IN_SHARED := 1
Sean Callananbd51cdd2010-01-29 01:30:01 +000013
Dan Gohman7c52f2e2010-04-15 23:08:00 +000014EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports
Dan Gohmanb16b53b2010-04-15 20:54:25 +000015
Sean Callananbd51cdd2010-01-29 01:30:01 +000016# 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
19include $(LEVEL)/Makefile.config
20
Chris Lattnerc510a702010-07-20 21:26:27 +000021LINK_COMPONENTS := mcdisassembler
Chris Lattner6f2cea02010-07-20 21:23:57 +000022
23# If the X86 target is enabled, link in the asmprinter and disassembler.
24ifneq ($(filter $(TARGETS_TO_BUILD), X86),)
25LINK_COMPONENTS += x86asmprinter x86disassembler
26endif
27
Oscar Fuentes3c00a832011-01-17 16:35:14 +000028# If the ARM target is enabled, link in the asmprinter and disassembler.
Chris Lattner6f2cea02010-07-20 21:23:57 +000029ifneq ($(filter $(TARGETS_TO_BUILD), ARM),)
30LINK_COMPONENTS += armasmprinter armdisassembler
31endif
Sean Callananbd51cdd2010-01-29 01:30:01 +000032
33include $(LEVEL)/Makefile.common
34
35ifeq ($(HOST_OS),Darwin)
Sean Callananbd51cdd2010-01-29 01:30:01 +000036 # extra options to override libtool defaults
37 LLVMLibsOptions := $(LLVMLibsOptions) \
Sean Callananeb3a1ab2010-04-02 00:53:42 +000038 -Wl,-dead_strip
39
40 ifdef EDIS_VERSION
Sean Callanandae9efc2010-04-12 20:23:08 +000041 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \
Sean Callananeb3a1ab2010-04-02 00:53:42 +000042 -Wl,-compatibility_version -Wl,1
43 endif
Sean Callananbd51cdd2010-01-29 01:30:01 +000044
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 Dunbarb259c012010-07-31 21:32:56 +000049 -Wl,-install_name \
Sean Callananeb3a1ab2010-04-02 00:53:42 +000050 -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
Sean Callananbd51cdd2010-01-29 01:30:01 +000051 endif
52endif
53