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