Home | History | Annotate | Download | only in coregrind
      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 	pub_core_xtree.h	\
    238 	pub_core_xtmemory.h	\
    239 	m_aspacemgr/priv_aspacemgr.h \
    240 	m_debuginfo/priv_misc.h	\
    241 	m_debuginfo/priv_storage.h	\
    242 	m_debuginfo/priv_tytypes.h      \
    243 	m_debuginfo/priv_readpdb.h	\
    244 	m_debuginfo/priv_d3basics.h	\
    245 	m_debuginfo/priv_readdwarf.h	\
    246 	m_debuginfo/priv_readdwarf3.h	\
    247 	m_debuginfo/priv_readelf.h	\
    248 	m_debuginfo/priv_readexidx.h	\
    249 	m_debuginfo/priv_readmacho.h	\
    250 	m_debuginfo/priv_image.h	\
    251 	m_debuginfo/lzoconf.h		\
    252 	m_debuginfo/lzodefs.h		\
    253 	m_debuginfo/minilzo.h		\
    254 	m_demangle/ansidecl.h	\
    255 	m_demangle/cp-demangle.h \
    256 	m_demangle/dyn-string.h	\
    257 	m_demangle/demangle.h	\
    258 	m_demangle/safe-ctype.h \
    259 	m_demangle/vg_libciface.h \
    260 	m_gdbserver/regcache.h \
    261 	m_gdbserver/regdef.h \
    262 	m_gdbserver/server.h \
    263 	m_gdbserver/target.h \
    264 	m_gdbserver/valgrind_low.h \
    265 	m_gdbserver/gdb/signals.h \
    266 	m_initimg/priv_initimg_pathscan.h \
    267 	m_scheduler/priv_sema.h \
    268 	m_scheduler/priv_sched-lock.h \
    269 	m_scheduler/priv_sched-lock-impl.h \
    270 	m_sigframe/priv_sigframe.h \
    271 	m_syswrap/priv_types_n_macros.h \
    272 	m_syswrap/priv_syswrap-generic.h \
    273 	m_syswrap/priv_syswrap-linux.h \
    274 	m_syswrap/priv_syswrap-linux-variants.h \
    275 	m_syswrap/priv_syswrap-darwin.h \
    276 	m_syswrap/priv_syswrap-solaris.h \
    277 	m_syswrap/priv_syswrap-main.h \
    278 	m_syswrap/priv_syswrap-xen.h \
    279 	m_ume/priv_ume.h \
    280 	vgdb.h
    281 
    282 #----------------------------------------------------------------------------
    283 # libcoregrind-<platform>.a
    284 #----------------------------------------------------------------------------
    285 
    286 BUILT_SOURCES = $(mach_user_srcs)
    287 CLEANFILES    = $(mach_user_srcs) $(mach_server_srcs) $(mach_hdrs)
    288 
    289 pkglib_LIBRARIES  = libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
    290 if VGCONF_HAVE_PLATFORM_SEC
    291 pkglib_LIBRARIES += libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
    292 endif
    293 
    294 COREGRIND_SOURCES_COMMON = \
    295 	m_addrinfo.c \
    296 	m_cache.c \
    297 	m_commandline.c \
    298 	m_compiler.c \
    299 	m_clientstate.c \
    300 	m_cpuid.S \
    301 	m_deduppoolalloc.c \
    302 	m_debuglog.c \
    303 	m_errormgr.c \
    304 	m_execontext.c \
    305 	m_hashtable.c \
    306 	m_libcbase.c \
    307 	m_libcassert.c \
    308 	m_libcfile.c \
    309 	m_libcprint.c \
    310 	m_libcproc.c \
    311 	m_libcsetjmp.c \
    312 	m_libcsignal.c \
    313 	m_machine.c \
    314 	m_main.c \
    315 	m_mallocfree.c \
    316 	m_options.c \
    317 	m_oset.c \
    318 	m_poolalloc.c \
    319 	m_rangemap.c \
    320 	m_redir.c \
    321 	m_sbprofile.c \
    322 	m_seqmatch.c \
    323 	m_signals.c \
    324 	m_sparsewa.c \
    325 	m_stacks.c \
    326 	m_stacktrace.c \
    327 	m_syscall.c \
    328 	m_threadstate.c \
    329 	m_tooliface.c \
    330 	m_trampoline.S \
    331 	m_translate.c \
    332 	m_transtab.c \
    333 	m_vki.c \
    334 	m_vkiscnums.c \
    335 	m_wordfm.c \
    336 	m_xarray.c \
    337 	m_xtree.c \
    338 	m_xtmemory.c \
    339 	m_aspacehl.c \
    340 	m_aspacemgr/aspacemgr-common.c \
    341 	m_aspacemgr/aspacemgr-linux.c \
    342 	m_aspacemgr/aspacemgr-segnames.c \
    343 	m_coredump/coredump-elf.c \
    344 	m_coredump/coredump-macho.c \
    345 	m_coredump/coredump-solaris.c \
    346 	m_debuginfo/misc.c \
    347 	m_debuginfo/d3basics.c \
    348 	m_debuginfo/debuginfo.c \
    349 	m_debuginfo/image.c \
    350 	m_debuginfo/minilzo-inl.c \
    351 	m_debuginfo/readdwarf.c \
    352 	m_debuginfo/readdwarf3.c \
    353 	m_debuginfo/readelf.c \
    354 	m_debuginfo/readexidx.c \
    355 	m_debuginfo/readmacho.c \
    356 	m_debuginfo/readpdb.c \
    357 	m_debuginfo/storage.c \
    358 	m_debuginfo/tinfl.c \
    359 	m_debuginfo/tytypes.c \
    360 	m_demangle/cp-demangle.c \
    361 	m_demangle/cplus-dem.c \
    362 	m_demangle/demangle.c \
    363 	m_demangle/dyn-string.c \
    364 	m_demangle/d-demangle.c \
    365 	m_demangle/rust-demangle.c \
    366 	m_demangle/safe-ctype.c \
    367 	m_dispatch/dispatch-x86-linux.S \
    368 	m_dispatch/dispatch-amd64-linux.S \
    369 	m_dispatch/dispatch-ppc32-linux.S \
    370 	m_dispatch/dispatch-ppc64be-linux.S \
    371 	m_dispatch/dispatch-ppc64le-linux.S \
    372 	m_dispatch/dispatch-arm-linux.S \
    373 	m_dispatch/dispatch-arm64-linux.S \
    374 	m_dispatch/dispatch-s390x-linux.S \
    375 	m_dispatch/dispatch-mips32-linux.S \
    376 	m_dispatch/dispatch-mips64-linux.S \
    377 	m_dispatch/dispatch-x86-darwin.S \
    378 	m_dispatch/dispatch-amd64-darwin.S \
    379 	m_dispatch/dispatch-x86-solaris.S \
    380 	m_dispatch/dispatch-amd64-solaris.S \
    381 	m_gdbserver/inferiors.c \
    382 	m_gdbserver/m_gdbserver.c \
    383 	m_gdbserver/regcache.c \
    384 	m_gdbserver/remote-utils.c \
    385 	m_gdbserver/server.c \
    386 	m_gdbserver/signals.c \
    387 	m_gdbserver/target.c \
    388 	m_gdbserver/utils.c \
    389 	m_gdbserver/valgrind-low-x86.c \
    390 	m_gdbserver/valgrind-low-amd64.c \
    391 	m_gdbserver/valgrind-low-arm.c \
    392 	m_gdbserver/valgrind-low-arm64.c \
    393 	m_gdbserver/valgrind-low-ppc32.c \
    394 	m_gdbserver/valgrind-low-ppc64.c \
    395 	m_gdbserver/valgrind-low-s390x.c \
    396 	m_gdbserver/valgrind-low-mips32.c \
    397 	m_gdbserver/valgrind-low-mips64.c \
    398 	m_gdbserver/version.c \
    399 	m_initimg/initimg-linux.c \
    400 	m_initimg/initimg-darwin.c \
    401 	m_initimg/initimg-solaris.c \
    402 	m_initimg/initimg-pathscan.c \
    403 	m_mach/mach_basics.c \
    404 	m_mach/mach_msg.c \
    405 	m_mach/mach_traps-x86-darwin.S \
    406 	m_mach/mach_traps-amd64-darwin.S \
    407 	m_replacemalloc/replacemalloc_core.c \
    408 	m_scheduler/sched-lock.c \
    409 	m_scheduler/sched-lock-generic.c \
    410 	m_scheduler/scheduler.c \
    411 	m_scheduler/sema.c \
    412 	m_sigframe/sigframe-common.c \
    413 	m_sigframe/sigframe-x86-linux.c \
    414 	m_sigframe/sigframe-amd64-linux.c \
    415 	m_sigframe/sigframe-ppc32-linux.c \
    416 	m_sigframe/sigframe-ppc64-linux.c \
    417 	m_sigframe/sigframe-arm-linux.c \
    418 	m_sigframe/sigframe-arm64-linux.c \
    419 	m_sigframe/sigframe-s390x-linux.c \
    420 	m_sigframe/sigframe-mips32-linux.c \
    421 	m_sigframe/sigframe-mips64-linux.c \
    422 	m_sigframe/sigframe-x86-darwin.c \
    423 	m_sigframe/sigframe-amd64-darwin.c \
    424 	m_sigframe/sigframe-solaris.c \
    425 	m_syswrap/syscall-x86-linux.S \
    426 	m_syswrap/syscall-amd64-linux.S \
    427 	m_syswrap/syscall-ppc32-linux.S \
    428 	m_syswrap/syscall-ppc64be-linux.S \
    429 	m_syswrap/syscall-ppc64le-linux.S \
    430 	m_syswrap/syscall-arm-linux.S \
    431 	m_syswrap/syscall-arm64-linux.S \
    432 	m_syswrap/syscall-s390x-linux.S \
    433 	m_syswrap/syscall-mips32-linux.S \
    434 	m_syswrap/syscall-mips64-linux.S \
    435 	m_syswrap/syscall-x86-darwin.S \
    436 	m_syswrap/syscall-amd64-darwin.S \
    437 	m_syswrap/syscall-x86-solaris.S \
    438 	m_syswrap/syscall-amd64-solaris.S \
    439 	m_syswrap/syswrap-main.c \
    440 	m_syswrap/syswrap-generic.c \
    441 	m_syswrap/syswrap-linux.c \
    442 	m_syswrap/syswrap-linux-variants.c \
    443 	m_syswrap/syswrap-darwin.c \
    444 	m_syswrap/syswrap-solaris.c \
    445 	m_syswrap/syswrap-x86-linux.c \
    446 	m_syswrap/syswrap-amd64-linux.c \
    447 	m_syswrap/syswrap-ppc32-linux.c \
    448 	m_syswrap/syswrap-ppc64-linux.c \
    449 	m_syswrap/syswrap-arm-linux.c \
    450 	m_syswrap/syswrap-arm64-linux.c \
    451 	m_syswrap/syswrap-s390x-linux.c \
    452 	m_syswrap/syswrap-mips32-linux.c \
    453 	m_syswrap/syswrap-mips64-linux.c \
    454 	m_syswrap/syswrap-x86-darwin.c \
    455 	m_syswrap/syswrap-amd64-darwin.c \
    456 	m_syswrap/syswrap-xen.c \
    457 	m_syswrap/syswrap-x86-solaris.c \
    458 	m_syswrap/syswrap-amd64-solaris.c \
    459 	m_ume/elf.c \
    460 	m_ume/macho.c \
    461 	m_ume/main.c \
    462 	m_ume/script.c
    463 
    464 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
    465     $(COREGRIND_SOURCES_COMMON)
    466 nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
    467     $(BUILT_SOURCES)
    468 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
    469     $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    470 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
    471     $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    472 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
    473     $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    474 if ENABLE_LINUX_TICKET_LOCK_PRIMARY
    475 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES += \
    476     m_scheduler/ticket-lock-linux.c
    477 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
    478     -DENABLE_LINUX_TICKET_LOCK
    479 endif
    480 
    481 if VGCONF_HAVE_PLATFORM_SEC
    482 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
    483     $(COREGRIND_SOURCES_COMMON)
    484 nodist_libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
    485     $(BUILT_SOURCES)
    486 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
    487     $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    488 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
    489     $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    490 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CCASFLAGS = \
    491     $(AM_CCASFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    492 if ENABLE_LINUX_TICKET_LOCK_SECONDARY
    493 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES += \
    494     m_scheduler/ticket-lock-linux.c
    495 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
    496     -DENABLE_LINUX_TICKET_LOCK
    497 endif
    498 endif
    499 
    500 #----------------------------------------------------------------------------
    501 # libreplacemalloc_toolpreload-<platform>.a
    502 #----------------------------------------------------------------------------
    503 
    504 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
    505 if VGCONF_HAVE_PLATFORM_SEC
    506 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
    507 endif
    508 
    509 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
    510 	m_replacemalloc/vg_replace_malloc.c
    511 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
    512 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    513 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
    514 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
    515 if VGCONF_HAVE_PLATFORM_SEC
    516 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
    517 	m_replacemalloc/vg_replace_malloc.c
    518 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
    519 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    520 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
    521 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
    522 endif
    523 
    524 #----------------------------------------------------------------------------
    525 # vgpreload_core-<platform>.a
    526 #----------------------------------------------------------------------------
    527 
    528 noinst_PROGRAMS  = vgpreload_core-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
    529 if VGCONF_HAVE_PLATFORM_SEC
    530 noinst_PROGRAMS += vgpreload_core-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
    531 endif
    532 
    533 if VGCONF_OS_IS_DARWIN
    534 noinst_DSYMS = $(noinst_PROGRAMS)
    535 endif
    536 
    537 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
    538 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
    539 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    540 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
    541 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
    542 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
    543 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    544 if VGCONF_HAVE_PLATFORM_SEC
    545 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
    546 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
    547 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    548 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
    549 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
    550 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
    551 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    552 endif
    553 
    554 if VGCONF_OS_IS_SOLARIS
    555 # Give the vgpreload_core library a proper soname so it can be easily
    556 # recognized during reading of debug information.
    557 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS += \
    558 	-Wl,-soname -Wl,vgpreload_core.so.0
    559 if VGCONF_HAVE_PLATFORM_SEC
    560 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS += \
    561 	-Wl,-soname -Wl,vgpreload_core.so.0
    562 endif
    563 endif
    564 
    565 #----------------------------------------------------------------------------
    566 # gdbserver xml target descriptions
    567 #----------------------------------------------------------------------------
    568 
    569 GDBSERVER_XML_FILES = \
    570 	m_gdbserver/32bit-core-valgrind-s1.xml \
    571 	m_gdbserver/32bit-core-valgrind-s2.xml \
    572 	m_gdbserver/32bit-core.xml \
    573 	m_gdbserver/32bit-linux-valgrind-s1.xml \
    574 	m_gdbserver/32bit-linux-valgrind-s2.xml \
    575 	m_gdbserver/32bit-linux.xml \
    576 	m_gdbserver/32bit-sse-valgrind-s1.xml \
    577 	m_gdbserver/32bit-sse-valgrind-s2.xml \
    578 	m_gdbserver/32bit-sse.xml \
    579 	m_gdbserver/64bit-avx-valgrind-s2.xml \
    580 	m_gdbserver/64bit-avx-valgrind-s1.xml \
    581 	m_gdbserver/64bit-avx.xml \
    582 	m_gdbserver/64bit-core-valgrind-s1.xml \
    583 	m_gdbserver/64bit-core-valgrind-s2.xml \
    584 	m_gdbserver/64bit-core.xml \
    585 	m_gdbserver/64bit-linux-valgrind-s1.xml \
    586 	m_gdbserver/64bit-linux-valgrind-s2.xml \
    587 	m_gdbserver/64bit-linux.xml \
    588 	m_gdbserver/64bit-sse-valgrind-s1.xml \
    589 	m_gdbserver/64bit-sse-valgrind-s2.xml \
    590 	m_gdbserver/64bit-sse.xml \
    591 	m_gdbserver/amd64-avx-coresse-valgrind.xml \
    592 	m_gdbserver/amd64-avx-coresse.xml \
    593 	m_gdbserver/amd64-avx-linux-valgrind.xml \
    594 	m_gdbserver/amd64-avx-linux.xml \
    595 	m_gdbserver/amd64-coresse-valgrind.xml \
    596 	m_gdbserver/amd64-linux-valgrind.xml \
    597 	m_gdbserver/arm-core-valgrind-s1.xml \
    598 	m_gdbserver/arm-core-valgrind-s2.xml \
    599 	m_gdbserver/arm-core.xml \
    600 	m_gdbserver/arm-vfpv3-valgrind-s1.xml \
    601 	m_gdbserver/arm-vfpv3-valgrind-s2.xml \
    602 	m_gdbserver/arm-vfpv3.xml \
    603 	m_gdbserver/arm-with-vfpv3-valgrind.xml \
    604 	m_gdbserver/arm-with-vfpv3.xml \
    605 	m_gdbserver/i386-coresse-valgrind.xml \
    606 	m_gdbserver/i386-linux-valgrind.xml \
    607 	m_gdbserver/power64-core-valgrind-s1.xml \
    608 	m_gdbserver/power64-core-valgrind-s2.xml \
    609 	m_gdbserver/power64-core.xml \
    610 	m_gdbserver/power64-core2-valgrind-s1.xml \
    611 	m_gdbserver/power64-core2-valgrind-s2.xml \
    612 	m_gdbserver/power64-linux-valgrind-s1.xml \
    613 	m_gdbserver/power64-linux-valgrind-s2.xml \
    614 	m_gdbserver/power64-linux.xml \
    615 	m_gdbserver/power-altivec-valgrind-s1.xml \
    616 	m_gdbserver/power-altivec-valgrind-s2.xml \
    617 	m_gdbserver/power-altivec.xml \
    618 	m_gdbserver/power-vsx-valgrind-s1.xml \
    619 	m_gdbserver/power-vsx-valgrind-s2.xml \
    620 	m_gdbserver/power-vsx.xml \
    621 	m_gdbserver/power-core-valgrind-s1.xml \
    622 	m_gdbserver/power-core-valgrind-s2.xml \
    623 	m_gdbserver/power-core.xml \
    624 	m_gdbserver/power-fpu-valgrind-s1.xml \
    625 	m_gdbserver/power-fpu-valgrind-s2.xml \
    626 	m_gdbserver/power-fpu.xml \
    627 	m_gdbserver/power-linux-valgrind-s1.xml \
    628 	m_gdbserver/power-linux-valgrind-s2.xml \
    629 	m_gdbserver/power-linux.xml \
    630 	m_gdbserver/powerpc-altivec32l-valgrind.xml \
    631 	m_gdbserver/powerpc-altivec32l.xml \
    632 	m_gdbserver/powerpc-altivec64l-valgrind.xml \
    633 	m_gdbserver/powerpc-altivec64l.xml \
    634 	m_gdbserver/s390-acr-valgrind-s1.xml \
    635 	m_gdbserver/s390-acr-valgrind-s2.xml \
    636 	m_gdbserver/s390-acr.xml \
    637 	m_gdbserver/s390-fpr-valgrind-s1.xml \
    638 	m_gdbserver/s390-fpr-valgrind-s2.xml \
    639 	m_gdbserver/s390-fpr.xml \
    640 	m_gdbserver/s390x-core64-valgrind-s1.xml \
    641 	m_gdbserver/s390x-core64-valgrind-s2.xml \
    642 	m_gdbserver/s390x-core64.xml \
    643 	m_gdbserver/s390x-generic-valgrind.xml \
    644 	m_gdbserver/s390x-generic.xml \
    645 	m_gdbserver/s390x-linux64-valgrind-s1.xml \
    646 	m_gdbserver/s390x-linux64-valgrind-s2.xml \
    647 	m_gdbserver/s390x-linux64.xml \
    648 	m_gdbserver/mips-cp0-valgrind-s1.xml \
    649 	m_gdbserver/mips-cp0-valgrind-s2.xml \
    650 	m_gdbserver/mips-cp0.xml \
    651 	m_gdbserver/mips-cpu-valgrind-s1.xml \
    652 	m_gdbserver/mips-cpu-valgrind-s2.xml \
    653 	m_gdbserver/mips-cpu.xml \
    654 	m_gdbserver/mips-linux.xml \
    655 	m_gdbserver/mips-linux-valgrind.xml \
    656 	m_gdbserver/mips-fpu-valgrind-s1.xml \
    657 	m_gdbserver/mips-fpu-valgrind-s2.xml \
    658 	m_gdbserver/mips-fpu.xml \
    659 	m_gdbserver/mips64-cp0-valgrind-s1.xml \
    660 	m_gdbserver/mips64-cp0-valgrind-s2.xml \
    661 	m_gdbserver/mips64-cp0.xml \
    662 	m_gdbserver/mips64-cpu-valgrind-s1.xml \
    663 	m_gdbserver/mips64-cpu-valgrind-s2.xml \
    664 	m_gdbserver/mips64-cpu.xml \
    665 	m_gdbserver/mips64-linux.xml \
    666 	m_gdbserver/mips64-linux-valgrind.xml \
    667 	m_gdbserver/mips64-fpu-valgrind-s1.xml \
    668 	m_gdbserver/mips64-fpu-valgrind-s2.xml \
    669 	m_gdbserver/mips64-fpu.xml
    670 
    671 # so as to make sure these get copied into the install tree
    672 vglibdir = $(pkglibdir)
    673 vglib_DATA  = $(GDBSERVER_XML_FILES)
    674 
    675 # so as to make sure these get copied into the tarball
    676 EXTRA_DIST  += $(GDBSERVER_XML_FILES)
    677 
    678 #----------------------------------------------------------------------------
    679 # General stuff
    680 #----------------------------------------------------------------------------
    681 
    682 all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
    683 	mkdir -p $(inplacedir); \
    684 	for f in $(vglib_DATA); do \
    685 	  rm -f $(inplacedir)/$$f; \
    686 	  ln -f -s ../$(subdir)/$$f $(inplacedir); \
    687 	done
    688 
    689 clean-local: clean-noinst_DSYMS
    690 
    691 install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
    692 
    693 uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS
    694 
    695 #----------------------------------------------------------------------------
    696 # Darwin linker kludges
    697 #----------------------------------------------------------------------------
    698 
    699 if VGCONF_OS_IS_DARWIN
    700 
    701 BUILT_SOURCES += fixup_macho_loadcmds
    702 fixup_macho_loadcmds: fixup_macho_loadcmds.c
    703 	$(CC) -I $(top_srcdir) -g -Wall -o $@ $<
    704 
    705 CLEANFILES += fixup_macho_loadcmds
    706 
    707 endif
    708 
    709 EXTRA_DIST += fixup_macho_loadcmds.c
    710