blob: c13f07a8e848daa82e25efc10c26f6fb213a7a4f [file] [log] [blame]
nethercote4388a402004-09-01 23:20:49 +00001include $(top_srcdir)/Makefile.all.am
njn8b68b642009-06-24 00:37:09 +00002
3dist_noinst_SCRIPTS = \
florian82a03712011-10-24 00:03:52 +00004 change-copyright-year \
5 dump_insn_ppc.sh \
njn8b68b642009-06-24 00:37:09 +00006 gen-mdg \
7 gsl16test \
8 gsl19test \
Elliott Hughesed398002017-06-21 14:41:24 -07009 make_or_upd_vgversion_h \
florianb0f4ce82011-10-25 20:01:41 +000010 nightly-build-summary \
floriane44b9cd2011-12-10 16:03:57 +000011 update-demangler \
njn8b68b642009-06-24 00:37:09 +000012 posixtestsuite-1.5.1-diff-results
13
14EXTRA_DIST = \
mjw3e8d6342013-07-03 10:00:19 +000015 docs/valgrind-listener-manpage.xml \
njn8b68b642009-06-24 00:37:09 +000016 DotToScc.hs \
17 Merge3Way.hs \
njn8b68b642009-06-24 00:37:09 +000018 gsl16-badfree.patch \
19 gsl16-wavelet.patch \
20 posixtestsuite-1.5.1-diff.txt \
21 ppcfround.c \
22 ppc64shifts.c \
23 primes.c
24
25#----------------------------------------------------------------------------
sewardj5d616df2013-07-02 08:07:15 +000026# valgrind_listener (built for the primary target only)
27# valgrind-di-server (ditto)
njn8b68b642009-06-24 00:37:09 +000028#----------------------------------------------------------------------------
njn7a6e7462002-11-09 17:53:30 +000029
sewardj5d616df2013-07-02 08:07:15 +000030bin_PROGRAMS = valgrind-listener valgrind-di-server
njn7a6e7462002-11-09 17:53:30 +000031
nethercote4388a402004-09-01 23:20:49 +000032valgrind_listener_SOURCES = valgrind-listener.c
njnf6ded8c2009-02-06 04:49:14 +000033valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
sewardj01262142006-01-04 01:20:28 +000034valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI)
35valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
36valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
philippe5d5dd8e2012-08-05 00:08:25 +000037if VGCONF_PLATVARIANT_IS_ANDROID
38valgrind_listener_CFLAGS += -static
39endif
rhyskidd9c8e1982015-07-25 05:50:10 +000040# If there is no secondary platform, and the platforms include x86-darwin,
41# then the primary platform must be x86-darwin. Hence:
42if ! VGCONF_HAVE_PLATFORM_SEC
njnea2d6fd2010-07-01 00:20:20 +000043if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
44valgrind_listener_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
45endif
rhyskidd9c8e1982015-07-25 05:50:10 +000046endif
sewardj8eb8bab2015-07-21 14:44:28 +000047if VGCONF_OS_IS_SOLARIS
48valgrind_listener_LDADD = -lsocket -lnsl
49endif
sewardj5d616df2013-07-02 08:07:15 +000050
51valgrind_di_server_SOURCES = valgrind-di-server.c
52valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
53valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI)
54valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
55valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
56if VGCONF_PLATVARIANT_IS_ANDROID
57valgrind_di_server_CFLAGS += -static
58endif
rhyskidd9c8e1982015-07-25 05:50:10 +000059# If there is no secondary platform, and the platforms include x86-darwin,
60# then the primary platform must be x86-darwin. Hence:
61if ! VGCONF_HAVE_PLATFORM_SEC
sewardj5d616df2013-07-02 08:07:15 +000062if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
63valgrind_di_server_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
64endif
rhyskidd9c8e1982015-07-25 05:50:10 +000065endif
sewardj8eb8bab2015-07-21 14:44:28 +000066if VGCONF_OS_IS_SOLARIS
67valgrind_di_server_LDADD = -lsocket -lnsl
68endif
philippe1670b052014-08-15 10:27:52 +000069
70#----------------------------------------------------------------------------
71# getoff-<platform>
72# Used to retrieve user space various offsets, using user space libraries.
73#----------------------------------------------------------------------------
sewardj68a8bb92014-08-17 12:23:56 +000074
philippe1670b052014-08-15 10:27:52 +000075noinst_PROGRAMS = getoff-@VGCONF_ARCH_PRI@-@VGCONF_OS@
76if VGCONF_HAVE_PLATFORM_SEC
77noinst_PROGRAMS += getoff-@VGCONF_ARCH_SEC@-@VGCONF_OS@
78endif
79
sewardj68a8bb92014-08-17 12:23:56 +000080# The link flags for this are tricky, because we want to build it for
81# both the primary and secondary platforms, and add
82# "-Wl,-read_only_relocs -Wl,suppress" to whichever of those is x86-darwin,
83# if any. Hence there's a double-nested conditional that adds to the
84# LDFLAGS in both cases.
85
philippe1670b052014-08-15 10:27:52 +000086getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
87getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
88getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
89getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
florianbb1a7872015-03-10 16:13:59 +000090getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
philippe1670b052014-08-15 10:27:52 +000091if HAVE_DLINFO_RTLD_DI_TLS_MODID
92getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
93endif
sewardj68a8bb92014-08-17 12:23:56 +000094# If there is no secondary platform, and the platforms include x86-darwin,
95# then the primary platform must be x86-darwin. Hence:
96if ! VGCONF_HAVE_PLATFORM_SEC
97if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
98getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
99endif
100endif
philippe1670b052014-08-15 10:27:52 +0000101
102if VGCONF_HAVE_PLATFORM_SEC
103getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = getoff.c
104getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
105getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
106getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC)
107getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_SEC)
108if HAVE_DLINFO_RTLD_DI_TLS_MODID
109getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
110endif
111endif
sewardj68a8bb92014-08-17 12:23:56 +0000112# If there is a secondary platform, and the platforms include x86-darwin,
113# then the primary platform must be amd64-darwin and the secondary platform
114# must be x86-darwin. Hence:
115if VGCONF_HAVE_PLATFORM_SEC
116if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
117getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress
118endif
119endif
philippe1670b052014-08-15 10:27:52 +0000120
121#----------------------------------------------------------------------------
122# General stuff
123#----------------------------------------------------------------------------
124
125all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
126
127clean-local: clean-noinst_DSYMS
128
129install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
130
131uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS