1include $(top_srcdir)/Makefile.all.am
2
3dist_noinst_SCRIPTS = \
4	change-copyright-year \
5	dump_insn_ppc.sh \
6	gen-mdg \
7	gsl16test \
8	gsl19test \
9	nightly-build-summary \
10	update-demangler \
11	posixtestsuite-1.5.1-diff-results
12
13EXTRA_DIST = \
14	docs/valgrind-listener-manpage.xml \
15	DotToScc.hs \
16	Merge3Way.hs \
17	gsl16-badfree.patch \
18	gsl16-wavelet.patch \
19	posixtestsuite-1.5.1-diff.txt \
20	ppcfround.c \
21	ppc64shifts.c \
22	primes.c
23
24#----------------------------------------------------------------------------
25# valgrind_listener  (built for the primary target only)
26# valgrind-di-server (ditto)
27#----------------------------------------------------------------------------
28
29bin_PROGRAMS = valgrind-listener valgrind-di-server
30
31valgrind_listener_SOURCES = valgrind-listener.c
32valgrind_listener_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
33valgrind_listener_CFLAGS    = $(AM_CFLAGS_PRI)
34valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
35valgrind_listener_LDFLAGS   = $(AM_CFLAGS_PRI)
36if VGCONF_PLATVARIANT_IS_ANDROID
37valgrind_listener_CFLAGS    += -static
38endif
39if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
40valgrind_listener_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
41endif
42
43valgrind_di_server_SOURCES   = valgrind-di-server.c
44valgrind_di_server_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
45valgrind_di_server_CFLAGS    = $(AM_CFLAGS_PRI)
46valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
47valgrind_di_server_LDFLAGS   = $(AM_CFLAGS_PRI)
48if VGCONF_PLATVARIANT_IS_ANDROID
49valgrind_di_server_CFLAGS    += -static
50endif
51if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
52valgrind_di_server_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
53endif
54
55#----------------------------------------------------------------------------
56# getoff-<platform>
57# Used to retrieve user space various offsets, using user space libraries.
58#----------------------------------------------------------------------------
59
60noinst_PROGRAMS  = getoff-@VGCONF_ARCH_PRI@-@VGCONF_OS@
61if VGCONF_HAVE_PLATFORM_SEC
62noinst_PROGRAMS += getoff-@VGCONF_ARCH_SEC@-@VGCONF_OS@
63endif
64
65# The link flags for this are tricky, because we want to build it for
66# both the primary and secondary platforms, and add
67# "-Wl,-read_only_relocs -Wl,suppress" to whichever of those is x86-darwin,
68# if any.  Hence there's a double-nested conditional that adds to the
69# LDFLAGS in both cases.
70
71getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES   = getoff.c
72getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
73getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
74getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
75getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
76if HAVE_DLINFO_RTLD_DI_TLS_MODID
77getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
78endif
79# If there is no secondary platform, and the platforms include x86-darwin,
80# then the primary platform must be x86-darwin.  Hence:
81if ! VGCONF_HAVE_PLATFORM_SEC
82if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
83getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
84endif
85endif
86
87if VGCONF_HAVE_PLATFORM_SEC
88getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES   = getoff.c
89getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
90getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
91getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC)
92getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_SEC)
93if HAVE_DLINFO_RTLD_DI_TLS_MODID
94getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
95endif
96endif
97# If there is a secondary platform, and the platforms include x86-darwin,
98# then the primary platform must be amd64-darwin and the secondary platform
99# must be x86-darwin.  Hence:
100if VGCONF_HAVE_PLATFORM_SEC
101if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
102getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
103endif
104endif
105
106#----------------------------------------------------------------------------
107# General stuff
108#----------------------------------------------------------------------------
109
110all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
111
112clean-local: clean-noinst_DSYMS
113
114install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
115
116uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS
117