summaryrefslogtreecommitdiff
path: root/cachegrind
diff options
context:
space:
mode:
authortom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-11-07 15:24:38 +0000
committertom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-11-07 15:24:38 +0000
commitfb7bcde4e3d8afdcd267b4da904f777cfd8ed1bb (patch)
tree4572f74f126688476aa31946d6ba5a9db69638ab /cachegrind
parent23e40f8a276d73c37ae72731d9714d7ba7d1ea92 (diff)
Dual architecture support - this commit is a major rework of the build
system that allows multiple copies of valgrind to be built so that we can build both x86 and amd64 versions of the tools on amd64 machines. The launcher is then modified to look at the program being run and decide which tool to use to run it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5027 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'cachegrind')
-rw-r--r--cachegrind/Makefile.am45
1 files changed, 35 insertions, 10 deletions
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
index 71fc8c49..863c12bc 100644
--- a/cachegrind/Makefile.am
+++ b/cachegrind/Makefile.am
@@ -2,16 +2,41 @@ include $(top_srcdir)/Makefile.tool.am
bin_SCRIPTS = cg_annotate
-# Remember to include all the arch-specific files in the distribution.
-EXTRA_DIST = \
- cg_sim.c \
- $(addsuffix .c,$(addprefix cg-,$(VG_ARCH_ALL)))
+noinst_HEADERS = cg_arch.h cg_sim.c
-noinst_HEADERS = cg_arch.h
+noinst_PROGRAMS =
+if VG_X86_LINUX
+noinst_PROGRAMS += cachegrind-x86-linux
+endif
+if VG_AMD64_LINUX
+noinst_PROGRAMS += cachegrind-amd64-linux
+endif
+if VG_PPC32_LINUX
+noinst_PROGRAMS += cachegrind-ppc32-linux
+endif
-val_PROGRAMS = cachegrind
+CACHEGRIND_SOURCES_COMMON = cg_main.c
+CACHEGRIND_SOURCES_X86 = cg-x86.c
+CACHEGRIND_SOURCES_AMD64 = cg-amd64.c
+CACHEGRIND_SOURCES_PPC32 = cg-ppc32.c
-cachegrind_SOURCES = cg_main.c cg-@VG_ARCH@.c
-cachegrind_DEPENDENCIES = $(COREGRIND_LIBS)
-cachegrind_LDADD = $(TOOL_LINKADD)
-cachegrind_LDFLAGS = $(TOOL_LINKFLAGS)
+cachegrind_x86_linux_SOURCES = $(CACHEGRIND_SOURCES_COMMON) $(CACHEGRIND_SOURCES_X86)
+cachegrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
+cachegrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX)
+cachegrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
+cachegrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
+cachegrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
+
+cachegrind_amd64_linux_SOURCES = $(CACHEGRIND_SOURCES_COMMON) $(CACHEGRIND_SOURCES_AMD64)
+cachegrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
+cachegrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX)
+cachegrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
+cachegrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
+cachegrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
+
+cachegrind_ppc32_linux_SOURCES = $(CACHEGRIND_SOURCES_COMMON) $(CACHEGRIND_SOURCES_PPC32)
+cachegrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
+cachegrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX)
+cachegrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
+cachegrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
+cachegrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)