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
39# If there is no secondary platform, and the platforms include x86-darwin,
40# then the primary platform must be x86-darwin.  Hence:
41if ! VGCONF_HAVE_PLATFORM_SEC
42if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
43valgrind_listener_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
44endif
45endif
46if VGCONF_OS_IS_SOLARIS
47valgrind_listener_LDADD      = -lsocket -lnsl
48endif
49
50valgrind_di_server_SOURCES   = valgrind-di-server.c
51valgrind_di_server_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
52valgrind_di_server_CFLAGS    = $(AM_CFLAGS_PRI)
53valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
54valgrind_di_server_LDFLAGS   = $(AM_CFLAGS_PRI)
55if VGCONF_PLATVARIANT_IS_ANDROID
56valgrind_di_server_CFLAGS    += -static
57endif
58# If there is no secondary platform, and the platforms include x86-darwin,
59# then the primary platform must be x86-darwin.  Hence:
60if ! VGCONF_HAVE_PLATFORM_SEC
61if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
62valgrind_di_server_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
63endif
64endif
65if VGCONF_OS_IS_SOLARIS
66valgrind_di_server_LDADD     = -lsocket -lnsl
67endif
68
69#----------------------------------------------------------------------------
70# getoff-<platform>
71# Used to retrieve user space various offsets, using user space libraries.
72#----------------------------------------------------------------------------
73
74noinst_PROGRAMS  = getoff-@VGCONF_ARCH_PRI@-@VGCONF_OS@
75if VGCONF_HAVE_PLATFORM_SEC
76noinst_PROGRAMS += getoff-@VGCONF_ARCH_SEC@-@VGCONF_OS@
77endif
78
79# The link flags for this are tricky, because we want to build it for
80# both the primary and secondary platforms, and add
81# "-Wl,-read_only_relocs -Wl,suppress" to whichever of those is x86-darwin,
82# if any.  Hence there's a double-nested conditional that adds to the
83# LDFLAGS in both cases.
84
85getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES   = getoff.c
86getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
87getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
88getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
89getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
90if HAVE_DLINFO_RTLD_DI_TLS_MODID
91getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
92endif
93# If there is no secondary platform, and the platforms include x86-darwin,
94# then the primary platform must be x86-darwin.  Hence:
95if ! VGCONF_HAVE_PLATFORM_SEC
96if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
97getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
98endif
99endif
100
101if VGCONF_HAVE_PLATFORM_SEC
102getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES   = getoff.c
103getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
104getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
105getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC)
106getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_SEC)
107if HAVE_DLINFO_RTLD_DI_TLS_MODID
108getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
109endif
110endif
111# If there is a secondary platform, and the platforms include x86-darwin,
112# then the primary platform must be amd64-darwin and the secondary platform
113# must be x86-darwin.  Hence:
114if VGCONF_HAVE_PLATFORM_SEC
115if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
116getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
117endif
118endif
119
120#----------------------------------------------------------------------------
121# General stuff
122#----------------------------------------------------------------------------
123
124all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
125
126clean-local: clean-noinst_DSYMS
127
128install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
129
130uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS
131