drd/drd_pthread_intercepts: Add a workaround for what is probably a compiler bug
[valgrind.git] / coregrind / Makefile.am
blob6a1a925fb58731fae14f7d50f47fc14677228378
2 # Be very careful when renaming any files, targets, whatever, in this
3 # Makefile.  Various parts of the system rely on these names having
4 # particular forms.
6 include $(top_srcdir)/Makefile.all.am
8 #----------------------------------------------------------------------------
9 # Basics, flags
10 #----------------------------------------------------------------------------
12 AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ += \
13         -I$(top_srcdir)/coregrind \
14         -DVG_LIBDIR="\"$(pkglibdir)"\" \
15         -DVG_PLATFORM="\"@VGCONF_ARCH_PRI@-@VGCONF_OS@\""
16 if VGCONF_HAVE_PLATFORM_SEC
17 AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ += \
18         -I$(top_srcdir)/coregrind \
19         -DVG_LIBDIR="\"$(pkglibdir)"\" \
20         -DVG_PLATFORM="\"@VGCONF_ARCH_SEC@-@VGCONF_OS@\""
21 endif
24 EXTRA_DIST = \
25         m_debuginfo/README.txt \
26         m_gdbserver/README_DEVELOPERS \
27         docs/vgdb-manpage.xml
29 #----------------------------------------------------------------------------
30 # The launcher.  Built for the primary target only.
31 #----------------------------------------------------------------------------
33 bin_PROGRAMS = \
34         valgrind \
35         vgdb
37 if VGCONF_OS_IS_LINUX
38 valgrind_SOURCES = \
39         launcher-linux.c \
40         m_debuglog.c
41 endif
42 if VGCONF_OS_IS_DARWIN
43 valgrind_SOURCES = \
44         launcher-darwin.c \
45         m_debuglog.c
46 endif
47 if VGCONF_OS_IS_SOLARIS
48 valgrind_SOURCES = \
49         launcher-linux.c \
50         m_debuglog.c
51 endif
53 # for valgrind coregrind building, use the LTO versions, in case they differ from non lto versions
54 AR = ${LTO_AR}
55 RANLIB = ${LTO_RANLIB}
57 valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
58 valgrind_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
59 valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
60 valgrind_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
61 # If there is no secondary platform, and the platforms include x86-darwin,
62 # then the primary platform must be x86-darwin.  Hence:
63 if ! VGCONF_HAVE_PLATFORM_SEC
64 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
65 valgrind_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
66 endif
67 endif
68 # On Android we must ask for non-executable stack, not sure why.
69 if VGCONF_PLATVARIANT_IS_ANDROID
70 valgrind_CFLAGS += -static
71 valgrind_LDFLAGS   += -Wl,-z,noexecstack
72 endif
73 if VGCONF_OS_IS_SOLARIS
74 valgrind_LDFLAGS   += -Wl,-M,/usr/lib/ld/map.noexstk
75 endif
78 vgdb_SOURCES = vgdb.c
79 if VGCONF_OS_IS_LINUX
80 if VGCONF_PLATVARIANT_IS_ANDROID
81 vgdb_SOURCES += vgdb-invoker-none.c
82 else
83 vgdb_SOURCES += vgdb-invoker-ptrace.c
84 endif
85 endif
86 if VGCONF_OS_IS_DARWIN
87 # Some darwin specific stuff is needed as ptrace is not
88 # fully supported on MacOS. Till we find someone courageous
89 # having access to Darwin, 'none' implementation is used.
90 vgdb_SOURCES += vgdb-invoker-none.c
91 endif
92 if VGCONF_OS_IS_SOLARIS
93 vgdb_SOURCES += vgdb-invoker-solaris.c
94 endif
96 vgdb_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
97 vgdb_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
98 vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
99 vgdb_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
100 if VGCONF_PLATVARIANT_IS_ANDROID
101 vgdb_CFLAGS    += -static
102 endif
103 if VGCONF_OS_IS_SOLARIS
104 vgdb_LDADD     = -lsocket
105 else
106 if !VGCONF_PLATVARIANT_IS_ANDROID
107 vgdb_LDADD     = -lpthread
108 endif
109 endif
110 # If there is no secondary platform, and the platforms include x86-darwin,
111 # then the primary platform must be x86-darwin.  Hence:
112 if ! VGCONF_HAVE_PLATFORM_SEC
113 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
114 vgdb_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
115 endif
116 endif
118 #----------------------------------------------------------------------------
119 # Darwin Mach stuff
120 #----------------------------------------------------------------------------
122 # Mach RPC interface definitions
123 # Here are some more .defs files that are not used, but could be in the
124 # future:
125 #       clock.defs \
126 #       clock_priv.defs \
127 #       clock_reply.defs \
128 #       exc.defs \
129 #       host_priv.defs \
130 #       host_security.defs \
131 #       ledger.defs \
132 #       lock_set.defs \
133 #       mach_host.defs \
134 #       mach_port.defs \
135 #       notify.defs \
136 #       processor.defs \
137 #       processor_set.defs \
139 mach_user_srcs =
140 mach_server_srcs =
141 mach_hdrs =
142 mach_defs =
143 if VGCONF_OS_IS_DARWIN
144 mach_user_srcs += \
145         m_mach/mach_vmUser.c \
146         m_mach/taskUser.c \
147         m_mach/thread_actUser.c \
148         m_mach/vm_mapUser.c
149 mach_server_srcs += \
150         m_mach/mach_vmServer.c \
151         m_mach/taskServer.c \
152         m_mach/thread_actServer.c \
153         m_mach/vm_mapServer.c
154 mach_hdrs += \
155         m_mach/mach_vm.h \
156         m_mach/task.h \
157         m_mach/thread_act.h \
158         m_mach/vm_map.h
159 mach_defs += \
160         @XCODE_DIR@/mach/mach_vm.defs \
161         @XCODE_DIR@/mach/task.defs \
162         @XCODE_DIR@/mach/thread_act.defs \
163         @XCODE_DIR@/mach/vm_map.defs
164 endif
166 # Be careful w.r.t. parallel builds.  See section 27.9 of the automake info
167 # page, "Handling Tools that Produce many Outputs".
168 $(abs_builddir)/m_mach: 
169         mkdir -p $@
170 $(mach_user_srcs): $(mach_defs) $(abs_builddir)/m_mach
171         (cd m_mach && mig $(mach_defs))
172 $(mach_hdrs): $(mach_defs) $(mach_user_srcs) $(abs_builddir)/m_mach
173         (cd m_mach && mig $(mach_defs))
175 #----------------------------------------------------------------------------
176 # Headers
177 #----------------------------------------------------------------------------
179 noinst_HEADERS = \
180         pub_core_addrinfo.h     \
181         pub_core_aspacehl.h     \
182         pub_core_aspacemgr.h    \
183         pub_core_basics.h       \
184         pub_core_basics_asm.h   \
185         pub_core_clientstate.h  \
186         pub_core_clreq.h        \
187         pub_core_commandline.h  \
188         pub_core_coredump.h     \
189         pub_core_cpuid.h        \
190         pub_core_deduppoolalloc.h \
191         pub_core_debuginfo.h    \
192         pub_core_debuglog.h     \
193         pub_core_demangle.h     \
194         pub_core_dispatch.h     \
195         pub_core_dispatch_asm.h \
196         pub_core_errormgr.h     \
197         pub_core_execontext.h   \
198         pub_core_gdbserver.h    \
199         pub_core_guest.h        \
200         pub_core_hashtable.h    \
201         pub_core_initimg.h      \
202         pub_core_inner.h        \
203         pub_core_libcbase.h     \
204         pub_core_libcassert.h   \
205         pub_core_libcfile.h     \
206         pub_core_libcprint.h    \
207         pub_core_libcproc.h     \
208         pub_core_libcsetjmp.h   \
209         pub_core_libcsignal.h   \
210         pub_core_mach.h         \
211         pub_core_machine.h      \
212         pub_core_mallocfree.h   \
213         pub_core_options.h      \
214         pub_core_oset.h         \
215         pub_core_poolalloc.h    \
216         pub_core_rangemap.h     \
217         pub_core_redir.h        \
218         pub_core_replacemalloc.h\
219         pub_core_sbprofile.h    \
220         pub_core_scheduler.h    \
221         pub_core_seqmatch.h     \
222         pub_core_sigframe.h     \
223         pub_core_signals.h      \
224         pub_core_sparsewa.h     \
225         pub_core_stacks.h       \
226         pub_core_stacktrace.h   \
227         pub_core_syscall.h      \
228         pub_core_syswrap.h      \
229         pub_core_threadstate.h  \
230         pub_core_tooliface.h    \
231         pub_core_trampoline.h   \
232         pub_core_translate.h    \
233         pub_core_transtab.h     \
234         pub_core_transtab_asm.h \
235         pub_core_ume.h          \
236         pub_core_vki.h          \
237         pub_core_vkiscnums.h    \
238         pub_core_vkiscnums_asm.h\
239         pub_core_wordfm.h       \
240         pub_core_xarray.h       \
241         pub_core_xtree.h        \
242         pub_core_xtmemory.h     \
243         m_aspacemgr/priv_aspacemgr.h \
244         m_debuginfo/priv_misc.h \
245         m_debuginfo/priv_storage.h      \
246         m_debuginfo/priv_tytypes.h      \
247         m_debuginfo/priv_readpdb.h      \
248         m_debuginfo/priv_d3basics.h     \
249         m_debuginfo/priv_readdwarf.h    \
250         m_debuginfo/priv_readdwarf3.h   \
251         m_debuginfo/priv_readelf.h      \
252         m_debuginfo/priv_readexidx.h    \
253         m_debuginfo/priv_readmacho.h    \
254         m_debuginfo/priv_image.h        \
255         m_debuginfo/lzoconf.h           \
256         m_debuginfo/lzodefs.h           \
257         m_debuginfo/minilzo.h           \
258         m_demangle/ansidecl.h   \
259         m_demangle/cp-demangle.h \
260         m_demangle/dyn-string.h \
261         m_demangle/demangle.h   \
262         m_demangle/safe-ctype.h \
263         m_demangle/vg_libciface.h \
264         m_gdbserver/regcache.h \
265         m_gdbserver/regdef.h \
266         m_gdbserver/server.h \
267         m_gdbserver/target.h \
268         m_gdbserver/valgrind_low.h \
269         m_gdbserver/gdb/signals.h \
270         m_initimg/priv_initimg_pathscan.h \
271         m_scheduler/priv_sema.h \
272         m_scheduler/priv_sched-lock.h \
273         m_scheduler/priv_sched-lock-impl.h \
274         m_sigframe/priv_sigframe.h \
275         m_syswrap/priv_types_n_macros.h \
276         m_syswrap/priv_syswrap-generic.h \
277         m_syswrap/priv_syswrap-linux.h \
278         m_syswrap/priv_syswrap-linux-variants.h \
279         m_syswrap/priv_syswrap-darwin.h \
280         m_syswrap/priv_syswrap-solaris.h \
281         m_syswrap/priv_syswrap-main.h \
282         m_syswrap/priv_syswrap-xen.h \
283         m_ume/priv_ume.h \
284         vgdb.h
286 #----------------------------------------------------------------------------
287 # libcoregrind-<platform>.a
288 #----------------------------------------------------------------------------
290 BUILT_SOURCES = $(mach_user_srcs)
291 CLEANFILES    = $(mach_user_srcs) $(mach_server_srcs) $(mach_hdrs)
293 pkglib_LIBRARIES  = libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
294 if VGCONF_HAVE_PLATFORM_SEC
295 pkglib_LIBRARIES += libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
296 endif
298 COREGRIND_SOURCES_COMMON = \
299         m_addrinfo.c \
300         m_cache.c \
301         m_commandline.c \
302         m_compiler.c \
303         m_clientstate.c \
304         m_cpuid.S \
305         m_deduppoolalloc.c \
306         m_debuglog.c \
307         m_errormgr.c \
308         m_execontext.c \
309         m_hashtable.c \
310         m_libcbase.c \
311         m_libcassert.c \
312         m_libcfile.c \
313         m_libcprint.c \
314         m_libcproc.c \
315         m_libcsignal.c \
316         m_machine.c \
317         m_mallocfree.c \
318         m_options.c \
319         m_oset.c \
320         m_poolalloc.c \
321         m_rangemap.c \
322         m_redir.c \
323         m_sbprofile.c \
324         m_seqmatch.c \
325         m_signals.c \
326         m_sparsewa.c \
327         m_stacks.c \
328         m_stacktrace.c \
329         m_syscall.c \
330         m_threadstate.c \
331         m_tooliface.c \
332         m_trampoline.S \
333         m_translate.c \
334         m_transtab.c \
335         m_vki.c \
336         m_vkiscnums.c \
337         m_wordfm.c \
338         m_xarray.c \
339         m_xtree.c \
340         m_xtmemory.c \
341         m_aspacehl.c \
342         m_aspacemgr/aspacemgr-common.c \
343         m_aspacemgr/aspacemgr-linux.c \
344         m_aspacemgr/aspacemgr-segnames.c \
345         m_coredump/coredump-elf.c \
346         m_coredump/coredump-macho.c \
347         m_coredump/coredump-solaris.c \
348         m_debuginfo/misc.c \
349         m_debuginfo/d3basics.c \
350         m_debuginfo/debuginfo.c \
351         m_debuginfo/image.c \
352         m_debuginfo/minilzo-inl.c \
353         m_debuginfo/readdwarf.c \
354         m_debuginfo/readdwarf3.c \
355         m_debuginfo/readelf.c \
356         m_debuginfo/readexidx.c \
357         m_debuginfo/readmacho.c \
358         m_debuginfo/readpdb.c \
359         m_debuginfo/storage.c \
360         m_debuginfo/tinfl.c \
361         m_debuginfo/tytypes.c \
362         m_demangle/cp-demangle.c \
363         m_demangle/cplus-dem.c \
364         m_demangle/demangle.c \
365         m_demangle/dyn-string.c \
366         m_demangle/d-demangle.c \
367         m_demangle/rust-demangle.c \
368         m_demangle/safe-ctype.c \
369         m_dispatch/dispatch-x86-linux.S \
370         m_dispatch/dispatch-amd64-linux.S \
371         m_dispatch/dispatch-ppc32-linux.S \
372         m_dispatch/dispatch-ppc64be-linux.S \
373         m_dispatch/dispatch-ppc64le-linux.S \
374         m_dispatch/dispatch-arm-linux.S \
375         m_dispatch/dispatch-arm64-linux.S \
376         m_dispatch/dispatch-s390x-linux.S \
377         m_dispatch/dispatch-mips32-linux.S \
378         m_dispatch/dispatch-mips64-linux.S \
379         m_dispatch/dispatch-nanomips-linux.S \
380         m_dispatch/dispatch-x86-darwin.S \
381         m_dispatch/dispatch-amd64-darwin.S \
382         m_dispatch/dispatch-x86-solaris.S \
383         m_dispatch/dispatch-amd64-solaris.S \
384         m_gdbserver/inferiors.c \
385         m_gdbserver/m_gdbserver.c \
386         m_gdbserver/regcache.c \
387         m_gdbserver/remote-utils.c \
388         m_gdbserver/server.c \
389         m_gdbserver/signals.c \
390         m_gdbserver/target.c \
391         m_gdbserver/utils.c \
392         m_gdbserver/valgrind-low-x86.c \
393         m_gdbserver/valgrind-low-amd64.c \
394         m_gdbserver/valgrind-low-arm.c \
395         m_gdbserver/valgrind-low-arm64.c \
396         m_gdbserver/valgrind-low-ppc32.c \
397         m_gdbserver/valgrind-low-ppc64.c \
398         m_gdbserver/valgrind-low-s390x.c \
399         m_gdbserver/valgrind-low-mips32.c \
400         m_gdbserver/valgrind-low-mips64.c \
401         m_gdbserver/valgrind-low-nanomips.c \
402         m_gdbserver/version.c \
403         m_initimg/initimg-linux.c \
404         m_initimg/initimg-darwin.c \
405         m_initimg/initimg-solaris.c \
406         m_initimg/initimg-pathscan.c \
407         m_mach/mach_basics.c \
408         m_mach/mach_msg.c \
409         m_mach/mach_traps-x86-darwin.S \
410         m_mach/mach_traps-amd64-darwin.S \
411         m_replacemalloc/replacemalloc_core.c \
412         m_scheduler/sched-lock.c \
413         m_scheduler/sched-lock-generic.c \
414         m_scheduler/scheduler.c \
415         m_scheduler/sema.c \
416         m_sigframe/sigframe-common.c \
417         m_sigframe/sigframe-x86-linux.c \
418         m_sigframe/sigframe-amd64-linux.c \
419         m_sigframe/sigframe-ppc32-linux.c \
420         m_sigframe/sigframe-ppc64-linux.c \
421         m_sigframe/sigframe-arm-linux.c \
422         m_sigframe/sigframe-arm64-linux.c \
423         m_sigframe/sigframe-s390x-linux.c \
424         m_sigframe/sigframe-mips32-linux.c \
425         m_sigframe/sigframe-mips64-linux.c \
426         m_sigframe/sigframe-nanomips-linux.c \
427         m_sigframe/sigframe-x86-darwin.c \
428         m_sigframe/sigframe-amd64-darwin.c \
429         m_sigframe/sigframe-solaris.c \
430         m_syswrap/syscall-x86-linux.S \
431         m_syswrap/syscall-amd64-linux.S \
432         m_syswrap/syscall-ppc32-linux.S \
433         m_syswrap/syscall-ppc64be-linux.S \
434         m_syswrap/syscall-ppc64le-linux.S \
435         m_syswrap/syscall-arm-linux.S \
436         m_syswrap/syscall-arm64-linux.S \
437         m_syswrap/syscall-s390x-linux.S \
438         m_syswrap/syscall-mips32-linux.S \
439         m_syswrap/syscall-mips64-linux.S \
440         m_syswrap/syscall-nanomips-linux.S \
441         m_syswrap/syscall-x86-darwin.S \
442         m_syswrap/syscall-amd64-darwin.S \
443         m_syswrap/syscall-x86-solaris.S \
444         m_syswrap/syscall-amd64-solaris.S \
445         m_syswrap/syswrap-main.c \
446         m_syswrap/syswrap-generic.c \
447         m_syswrap/syswrap-linux.c \
448         m_syswrap/syswrap-linux-variants.c \
449         m_syswrap/syswrap-darwin.c \
450         m_syswrap/syswrap-solaris.c \
451         m_syswrap/syswrap-x86-linux.c \
452         m_syswrap/syswrap-amd64-linux.c \
453         m_syswrap/syswrap-ppc32-linux.c \
454         m_syswrap/syswrap-ppc64-linux.c \
455         m_syswrap/syswrap-arm-linux.c \
456         m_syswrap/syswrap-arm64-linux.c \
457         m_syswrap/syswrap-s390x-linux.c \
458         m_syswrap/syswrap-mips32-linux.c \
459         m_syswrap/syswrap-mips64-linux.c \
460         m_syswrap/syswrap-nanomips-linux.c \
461         m_syswrap/syswrap-x86-darwin.c \
462         m_syswrap/syswrap-amd64-darwin.c \
463         m_syswrap/syswrap-xen.c \
464         m_syswrap/syswrap-x86-solaris.c \
465         m_syswrap/syswrap-amd64-solaris.c \
466         m_ume/elf.c \
467         m_ume/macho.c \
468         m_ume/main.c \
469         m_ume/script.c
471 # The below files cannot be compiled with lto, otherwise that gives
472 # undefined symbols at link time. So, define a noinst library to
473 # build the needed .o with specific flags.
474 # These objects are added to the libcoregrind library.
475 NOLTO_COREGRIND_SOURCES_COMMON = \
476         m_libcsetjmp.c \
477         m_main.c
478 noinst_LIBRARIES = libnolto_coregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
479 libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
480     $(NOLTO_COREGRIND_SOURCES_COMMON)
481 libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
482     $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
483 libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
484     $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
485 libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
486     $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
488 if VGCONF_HAVE_PLATFORM_SEC
489 noinst_LIBRARIES += libnolto_coregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
490 libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
491     $(NOLTO_COREGRIND_SOURCES_COMMON)
492 libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
493     $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
494 libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
495     $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
496 libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CCASFLAGS = \
497     $(AM_CCASFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
498 endif
501 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
502     $(COREGRIND_SOURCES_COMMON)
503 nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
504     $(BUILT_SOURCES)
505 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
506     $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
507 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = $(LTO_CFLAGS) \
508     $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
509 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
510     $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
511 if ENABLE_LINUX_TICKET_LOCK_PRIMARY
512 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES += \
513     m_scheduler/ticket-lock-linux.c
514 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
515     -DENABLE_LINUX_TICKET_LOCK
516 endif
517 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_LIBADD = \
518     $(libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_OBJECTS)
519 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_DEPENDENCIES = \
520     libnolto_coregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
522 if VGCONF_HAVE_PLATFORM_SEC
523 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
524     $(COREGRIND_SOURCES_COMMON)
525 nodist_libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
526     $(BUILT_SOURCES)
527 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
528     $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
529 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS =  $(LTO_CFLAGS) \
530     $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
531 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CCASFLAGS = \
532     $(AM_CCASFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
533 if ENABLE_LINUX_TICKET_LOCK_SECONDARY
534 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES += \
535     m_scheduler/ticket-lock-linux.c
536 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
537     -DENABLE_LINUX_TICKET_LOCK
538 endif
539 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_LIBADD = \
540     $(libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_OBJECTS)
541 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_DEPENDENCIES = \
542     libnolto_coregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
543 endif
545 #----------------------------------------------------------------------------
546 # libreplacemalloc_toolpreload-<platform>.a
547 #----------------------------------------------------------------------------
549 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
550 if VGCONF_HAVE_PLATFORM_SEC
551 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
552 endif
554 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
555         m_replacemalloc/vg_replace_malloc.c
556 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
557         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
558 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
559         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
560 if VGCONF_HAVE_PLATFORM_SEC
561 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
562         m_replacemalloc/vg_replace_malloc.c
563 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
564         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
565 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
566         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
567 endif
569 #----------------------------------------------------------------------------
570 # vgpreload_core-<platform>.a
571 #----------------------------------------------------------------------------
573 noinst_PROGRAMS  = vgpreload_core-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
574 if VGCONF_HAVE_PLATFORM_SEC
575 noinst_PROGRAMS += vgpreload_core-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
576 endif
578 if VGCONF_OS_IS_DARWIN
579 noinst_DSYMS = $(noinst_PROGRAMS)
580 endif
582 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
583 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
584         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
585 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
586         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
587 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
588         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
589 if VGCONF_HAVE_PLATFORM_SEC
590 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
591 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
592         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
593 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
594         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
595 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
596         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
597 endif
599 if VGCONF_OS_IS_SOLARIS
600 # Give the vgpreload_core library a proper soname so it can be easily
601 # recognized during reading of debug information.
602 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS += \
603         -Wl,-soname -Wl,vgpreload_core.so.0
604 if VGCONF_HAVE_PLATFORM_SEC
605 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS += \
606         -Wl,-soname -Wl,vgpreload_core.so.0
607 endif
608 endif
610 #----------------------------------------------------------------------------
611 # gdbserver xml target descriptions
612 #----------------------------------------------------------------------------
614 GDBSERVER_XML_FILES = \
615         m_gdbserver/32bit-core-valgrind-s1.xml \
616         m_gdbserver/32bit-core-valgrind-s2.xml \
617         m_gdbserver/32bit-core.xml \
618         m_gdbserver/32bit-linux-valgrind-s1.xml \
619         m_gdbserver/32bit-linux-valgrind-s2.xml \
620         m_gdbserver/32bit-linux.xml \
621         m_gdbserver/32bit-sse-valgrind-s1.xml \
622         m_gdbserver/32bit-sse-valgrind-s2.xml \
623         m_gdbserver/32bit-sse.xml \
624         m_gdbserver/64bit-avx-valgrind-s2.xml \
625         m_gdbserver/64bit-avx-valgrind-s1.xml \
626         m_gdbserver/64bit-avx.xml \
627         m_gdbserver/64bit-core-valgrind-s1.xml \
628         m_gdbserver/64bit-core-valgrind-s2.xml \
629         m_gdbserver/64bit-core.xml \
630         m_gdbserver/64bit-linux-valgrind-s1.xml \
631         m_gdbserver/64bit-linux-valgrind-s2.xml \
632         m_gdbserver/64bit-linux.xml \
633         m_gdbserver/64bit-sse-valgrind-s1.xml \
634         m_gdbserver/64bit-sse-valgrind-s2.xml \
635         m_gdbserver/64bit-sse.xml \
636         m_gdbserver/amd64-avx-coresse-valgrind.xml \
637         m_gdbserver/amd64-avx-coresse.xml \
638         m_gdbserver/amd64-avx-linux-valgrind.xml \
639         m_gdbserver/amd64-avx-linux.xml \
640         m_gdbserver/amd64-coresse-valgrind.xml \
641         m_gdbserver/amd64-linux-valgrind.xml \
642         m_gdbserver/arm-core-valgrind-s1.xml \
643         m_gdbserver/arm-core-valgrind-s2.xml \
644         m_gdbserver/arm-core.xml \
645         m_gdbserver/arm-vfpv3-valgrind-s1.xml \
646         m_gdbserver/arm-vfpv3-valgrind-s2.xml \
647         m_gdbserver/arm-vfpv3.xml \
648         m_gdbserver/arm-with-vfpv3-valgrind.xml \
649         m_gdbserver/arm-with-vfpv3.xml \
650         m_gdbserver/i386-coresse-valgrind.xml \
651         m_gdbserver/i386-linux-valgrind.xml \
652         m_gdbserver/power64-core-valgrind-s1.xml \
653         m_gdbserver/power64-core-valgrind-s2.xml \
654         m_gdbserver/power64-core.xml \
655         m_gdbserver/power64-core2-valgrind-s1.xml \
656         m_gdbserver/power64-core2-valgrind-s2.xml \
657         m_gdbserver/power64-linux-valgrind-s1.xml \
658         m_gdbserver/power64-linux-valgrind-s2.xml \
659         m_gdbserver/power64-linux.xml \
660         m_gdbserver/power-altivec-valgrind-s1.xml \
661         m_gdbserver/power-altivec-valgrind-s2.xml \
662         m_gdbserver/power-altivec.xml \
663         m_gdbserver/power-vsx-valgrind-s1.xml \
664         m_gdbserver/power-vsx-valgrind-s2.xml \
665         m_gdbserver/power-vsx.xml \
666         m_gdbserver/power-core-valgrind-s1.xml \
667         m_gdbserver/power-core-valgrind-s2.xml \
668         m_gdbserver/power-core.xml \
669         m_gdbserver/power-fpu-valgrind-s1.xml \
670         m_gdbserver/power-fpu-valgrind-s2.xml \
671         m_gdbserver/power-fpu.xml \
672         m_gdbserver/power-linux-valgrind-s1.xml \
673         m_gdbserver/power-linux-valgrind-s2.xml \
674         m_gdbserver/power-linux.xml \
675         m_gdbserver/powerpc-altivec32l-valgrind.xml \
676         m_gdbserver/powerpc-altivec32l.xml \
677         m_gdbserver/powerpc-altivec64l-valgrind.xml \
678         m_gdbserver/powerpc-altivec64l.xml \
679         m_gdbserver/s390-acr-valgrind-s1.xml \
680         m_gdbserver/s390-acr-valgrind-s2.xml \
681         m_gdbserver/s390-acr.xml \
682         m_gdbserver/s390-fpr-valgrind-s1.xml \
683         m_gdbserver/s390-fpr-valgrind-s2.xml \
684         m_gdbserver/s390-fpr.xml \
685         m_gdbserver/s390x-core64-valgrind-s1.xml \
686         m_gdbserver/s390x-core64-valgrind-s2.xml \
687         m_gdbserver/s390x-core64.xml \
688         m_gdbserver/s390x-generic-valgrind.xml \
689         m_gdbserver/s390x-generic.xml \
690         m_gdbserver/s390x-linux64-valgrind-s1.xml \
691         m_gdbserver/s390x-linux64-valgrind-s2.xml \
692         m_gdbserver/s390x-linux64.xml \
693         m_gdbserver/s390-vx-valgrind-s1.xml \
694         m_gdbserver/s390-vx-valgrind-s2.xml \
695         m_gdbserver/s390-vx.xml \
696         m_gdbserver/s390x-vx-linux-valgrind.xml \
697         m_gdbserver/s390x-vx-linux.xml \
698         m_gdbserver/mips-cp0-valgrind-s1.xml \
699         m_gdbserver/mips-cp0-valgrind-s2.xml \
700         m_gdbserver/mips-cp0.xml \
701         m_gdbserver/mips-cpu-valgrind-s1.xml \
702         m_gdbserver/mips-cpu-valgrind-s2.xml \
703         m_gdbserver/mips-cpu.xml \
704         m_gdbserver/mips-linux.xml \
705         m_gdbserver/mips-linux-valgrind.xml \
706         m_gdbserver/mips-fpu-valgrind-s1.xml \
707         m_gdbserver/mips-fpu-valgrind-s2.xml \
708         m_gdbserver/mips-fpu.xml \
709         m_gdbserver/mips64-cp0-valgrind-s1.xml \
710         m_gdbserver/mips64-cp0-valgrind-s2.xml \
711         m_gdbserver/mips64-cp0.xml \
712         m_gdbserver/mips64-cpu-valgrind-s1.xml \
713         m_gdbserver/mips64-cpu-valgrind-s2.xml \
714         m_gdbserver/mips64-cpu.xml \
715         m_gdbserver/mips64-linux.xml \
716         m_gdbserver/mips64-linux-valgrind.xml \
717         m_gdbserver/mips64-fpu-valgrind-s1.xml \
718         m_gdbserver/mips64-fpu-valgrind-s2.xml \
719         m_gdbserver/mips64-fpu.xml
721 # so as to make sure these get copied into the install tree
722 vglibdir = $(pkglibdir)
723 vglib_DATA  = $(GDBSERVER_XML_FILES)
725 # so as to make sure these get copied into the tarball
726 EXTRA_DIST  += $(GDBSERVER_XML_FILES)
728 #----------------------------------------------------------------------------
729 # General stuff
730 #----------------------------------------------------------------------------
732 all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
733         mkdir -p $(inplacedir); \
734         for f in $(vglib_DATA); do \
735           rm -f $(inplacedir)/$$f; \
736           ln -f -s ../$(subdir)/$$f $(inplacedir); \
737         done
739 clean-local: clean-noinst_DSYMS
741 install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
743 uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS
745 #----------------------------------------------------------------------------
746 # Darwin linker kludges
747 #----------------------------------------------------------------------------
749 if VGCONF_OS_IS_DARWIN
751 BUILT_SOURCES += fixup_macho_loadcmds
752 fixup_macho_loadcmds: fixup_macho_loadcmds.c
753         $(CC) -I$(top_srcdir) -I$(top_builddir) -g -Wall -o $@ $<
755 CLEANFILES += fixup_macho_loadcmds
757 endif
759 EXTRA_DIST += fixup_macho_loadcmds.c