blob: 7c9318e8df3a01c7101c3511804da5dec9e5f8a2 [file] [log] [blame]
SUBDIRS = . tests docs
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.install.am
include $(top_srcdir)/Makefile.tool-flags.am
include $(top_srcdir)/Makefile.tool-inplace.am
LIBREPLACEMALLOC_X86_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_linux.a
LIBREPLACEMALLOC_AMD64_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_linux.a
LIBREPLACEMALLOC_PPC32_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_linux.a
LIBREPLACEMALLOC_PPC64_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_linux.a
COREGRIND_LIBS_X86_LINUX = \
$(top_builddir)/coregrind/libcoregrind_x86_linux.a \
@VEX_DIR@/libvex_x86_linux.a
COREGRIND_LIBS_AMD64_LINUX = \
$(top_builddir)/coregrind/libcoregrind_amd64_linux.a \
@VEX_DIR@/libvex_amd64_linux.a
COREGRIND_LIBS_PPC32_LINUX = \
$(top_builddir)/coregrind/libcoregrind_ppc32_linux.a \
@VEX_DIR@/libvex_ppc32_linux.a
COREGRIND_LIBS_PPC64_LINUX = \
$(top_builddir)/coregrind/libcoregrind_ppc64_linux.a \
@VEX_DIR@/libvex_ppc64_linux.a
##.PHONY: @VEX_DIR@/libvex.a
@VEX_DIR@/libvex_x86_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
$(MAKE) -C @VEX_DIR@ CC="$(CC)" libvex_x86_linux.a \
EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@"
@VEX_DIR@/libvex_amd64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
$(MAKE) -C @VEX_DIR@ CC="$(CC)" libvex_amd64_linux.a \
EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@"
@VEX_DIR@/libvex_ppc32_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
$(MAKE) -C @VEX_DIR@ CC="$(CC)" libvex_ppc32_linux.a \
EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@"
@VEX_DIR@/libvex_ppc64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
$(MAKE) -C @VEX_DIR@ CC="$(CC)" libvex_ppc64_linux.a \
EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@"
@VEX_DIR@/priv/main/vex_svnversion.h:
$(MAKE) -C @VEX_DIR@ CC="$(CC)" version
TOOL_LDADD_COMMON = -lgcc
TOOL_LDFLAGS_COMMON = -static \
-Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \
-nodefaultlibs -nostartfiles -u _start
TOOL_LDADD_X86_LINUX = $(COREGRIND_LIBS_X86_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_X86_LINUX = \
$(TOOL_LDFLAGS_COMMON) @FLAG_M32@ \
-Wl,-T,$(top_builddir)/valt_load_address_x86_linux.lds
TOOL_LDADD_AMD64_LINUX = $(COREGRIND_LIBS_AMD64_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_AMD64_LINUX = \
$(TOOL_LDFLAGS_COMMON) -m64 \
-Wl,-T,$(top_builddir)/valt_load_address_amd64_linux.lds
TOOL_LDADD_PPC32_LINUX = $(COREGRIND_LIBS_PPC32_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC32_LINUX = \
$(TOOL_LDFLAGS_COMMON) @FLAG_M32@ \
-Wl,-T,$(top_builddir)/valt_load_address_ppc32_linux.lds
TOOL_LDADD_PPC64_LINUX = $(COREGRIND_LIBS_PPC64_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC64_LINUX = \
$(TOOL_LDFLAGS_COMMON) -m64 \
-Wl,-T,$(top_builddir)/valt_load_address_ppc64_linux.lds
PRELOAD_LDFLAGS_COMMON = -nostdlib -shared -Wl,-z,interpose,-z,initfirst
PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON) @FLAG_M32@
PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON) -m64
PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON) @FLAG_M32@
PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON) -m64
LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
-Wl,--whole-archive \
$(LIBREPLACEMALLOC_X86_LINUX) \
-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \
-Wl,--whole-archive \
$(LIBREPLACEMALLOC_AMD64_LINUX) \
-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \
-Wl,--whole-archive \
$(LIBREPLACEMALLOC_PPC32_LINUX) \
-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \
-Wl,--whole-archive \
$(LIBREPLACEMALLOC_PPC64_LINUX) \
-Wl,--no-whole-archive