]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/Makefile.am
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / coregrind / Makefile.am
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/UNUSED_STABS.txt \
26         m_debuginfo/README.txt
27
28 #----------------------------------------------------------------------------
29 # The launcher.  Built for the primary target only.
30 #----------------------------------------------------------------------------
31
32 if VGCONF_OS_IS_L4RE
33 bin_PROGRAMS = 
34 else
35 bin_PROGRAMS = \
36         valgrind \
37         vgdb \
38         no_op_client_for_valgrind
39 endif
40
41 if VGCONF_OS_IS_LINUX
42 valgrind_SOURCES = \
43         launcher-linux.c \
44         m_debuglog.c
45 endif
46 if VGCONF_OS_IS_AIX5
47 valgrind_SOURCES = \
48         launcher-aix5.c \
49         m_debuglog.c \
50         m_vkiscnums.c
51 endif
52 if VGCONF_OS_IS_DARWIN
53 valgrind_SOURCES = \
54         launcher-darwin.c \
55         m_debuglog.c
56 endif
57
58 valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
59 valgrind_CFLAGS    = $(AM_CFLAGS_PRI)
60 valgrind_CXXFLAGS  = $(AM_CXXFLAGS_PRI)
61 valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
62 valgrind_LDFLAGS   = $(AM_CFLAGS_PRI)
63 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
64 valgrind_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
65 endif
66
67 vgdb_SOURCES = vgdb.c
68 vgdb_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
69 vgdb_CFLAGS    = $(AM_CFLAGS_PRI)
70 vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
71 vgdb_LDFLAGS   = $(AM_CFLAGS_PRI) -lpthread
72 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
73 vgdb_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
74 endif
75
76 no_op_client_for_valgrind_SOURCES = no_op_client_for_valgrind.c
77 no_op_client_for_valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
78 no_op_client_for_valgrind_CFLAGS    = $(AM_CFLAGS_PRI)
79 no_op_client_for_valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
80 no_op_client_for_valgrind_LDFLAGS   = $(AM_CFLAGS_PRI)
81 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
82 no_op_client_for_valgrind_LDFLAGS   += -Wl,-read_only_relocs -Wl,suppress
83 endif
84
85 #----------------------------------------------------------------------------
86 # Darwin Mach stuff
87 #----------------------------------------------------------------------------
88
89 # Mach RPC interface definitions
90 # Here are some more .defs files that are not used, but could be in the
91 # future:
92 #       clock.defs \
93 #       clock_priv.defs \
94 #       clock_reply.defs \
95 #       exc.defs \
96 #       host_priv.defs \
97 #       host_security.defs \
98 #       ledger.defs \
99 #       lock_set.defs \
100 #       mach_host.defs \
101 #       mach_port.defs \
102 #       notify.defs \
103 #       processor.defs \
104 #       processor_set.defs \
105 #
106 mach_user_srcs =
107 mach_server_srcs =
108 mach_hdrs =
109 mach_defs =
110 if VGCONF_OS_IS_DARWIN
111 mach_user_srcs += \
112         m_mach/mach_vmUser.c \
113         m_mach/taskUser.c \
114         m_mach/thread_actUser.c \
115         m_mach/vm_mapUser.c
116 mach_server_srcs += \
117         m_mach/mach_vmServer.c \
118         m_mach/taskServer.c \
119         m_mach/thread_actServer.c \
120         m_mach/vm_mapServer.c
121 mach_hdrs += \
122         m_mach/mach_vm.h \
123         m_mach/task.h \
124         m_mach/thread_act.h \
125         m_mach/vm_map.h
126 mach_defs += \
127         /usr/include/mach/mach_vm.defs \
128         /usr/include/mach/task.defs \
129         /usr/include/mach/thread_act.defs \
130         /usr/include/mach/vm_map.defs
131 endif
132
133 # Be careful w.r.t. parallel builds.  See section 27.9 of the automake info
134 # page, "Handling Tools that Produce many Outputs".
135 $(abs_builddir)/m_mach: 
136         mkdir -p $@
137 $(mach_user_srcs): $(mach_defs) $(abs_builddir)/m_mach
138         (cd m_mach && mig $(mach_defs))
139 $(mach_hdrs): $(mach_defs) $(mach_user_srcs) $(abs_builddir)/m_mach
140         (cd m_mach && mig $(mach_defs))
141
142 #----------------------------------------------------------------------------
143 # Headers
144 #----------------------------------------------------------------------------
145
146 noinst_HEADERS = \
147         launcher-aix5-bootblock.h \
148         pub_core_aspacehl.h     \
149         pub_core_aspacemgr.h    \
150         pub_core_basics.h       \
151         pub_core_basics_asm.h   \
152         pub_core_clientstate.h  \
153         pub_core_clreq.h        \
154         pub_core_commandline.h  \
155         pub_core_coredump.h     \
156         pub_core_cpuid.h        \
157         pub_core_debuginfo.h    \
158         pub_core_debugger.h     \
159         pub_core_debuglog.h     \
160         pub_core_demangle.h     \
161         pub_core_dispatch.h     \
162         pub_core_dispatch_asm.h \
163         pub_core_errormgr.h     \
164         pub_core_execontext.h   \
165         pub_core_gdbserver.h    \
166         pub_core_hashtable.h    \
167         pub_core_initimg.h      \
168         pub_core_libcbase.h     \
169         pub_core_libcassert.h   \
170         pub_core_libcfile.h     \
171         pub_core_libcprint.h    \
172         pub_core_libcproc.h     \
173         pub_core_libcsetjmp.h   \
174         pub_core_libcsignal.h   \
175         pub_core_mach.h         \
176         pub_core_machine.h      \
177         pub_core_mallocfree.h   \
178         pub_core_options.h      \
179         pub_core_oset.h         \
180         pub_core_redir.h        \
181         pub_core_replacemalloc.h\
182         pub_core_scheduler.h    \
183         pub_core_seqmatch.h     \
184         pub_core_sigframe.h     \
185         pub_core_signals.h      \
186         pub_core_sparsewa.h     \
187         pub_core_stacks.h       \
188         pub_core_stacktrace.h   \
189         pub_core_syscall.h      \
190         pub_core_syswrap.h      \
191         pub_core_threadstate.h  \
192         pub_core_tooliface.h    \
193         pub_core_trampoline.h   \
194         pub_core_translate.h    \
195         pub_core_transtab.h     \
196         pub_core_transtab_asm.h \
197         pub_core_ume.h          \
198         pub_core_vki.h          \
199         pub_core_vkiscnums.h    \
200         pub_core_vkiscnums_asm.h\
201         pub_core_wordfm.h       \
202         pub_core_xarray.h       \
203         m_aspacemgr/priv_aspacemgr.h \
204         m_debuginfo/priv_misc.h \
205         m_debuginfo/priv_storage.h      \
206         m_debuginfo/priv_tytypes.h      \
207         m_debuginfo/priv_readstabs.h    \
208         m_debuginfo/priv_readpdb.h      \
209         m_debuginfo/priv_d3basics.h     \
210         m_debuginfo/priv_readdwarf.h    \
211         m_debuginfo/priv_readdwarf3.h   \
212         m_debuginfo/priv_readelf.h      \
213         m_debuginfo/priv_readmacho.h    \
214         m_debuginfo/priv_readxcoff.h    \
215         m_demangle/ansidecl.h   \
216         m_demangle/cp-demangle.h \
217         m_demangle/dyn-string.h \
218         m_demangle/demangle.h   \
219         m_demangle/safe-ctype.h \
220         m_demangle/vg_libciface.h \
221         m_gdbserver/regcache.h \
222         m_gdbserver/regdef.h \
223         m_gdbserver/server.h \
224         m_gdbserver/target.h \
225         m_gdbserver/valgrind_low.h \
226         m_gdbserver/gdb/signals.h \
227         m_initimg/priv_initimg_pathscan.h \
228         m_initimg/simple_huffman.c \
229         m_scheduler/priv_sema.h \
230         m_syswrap/priv_types_n_macros.h \
231         m_syswrap/priv_syswrap-generic.h \
232         m_syswrap/priv_syswrap-linux.h \
233         m_syswrap/priv_syswrap-linux-variants.h \
234         m_syswrap/priv_syswrap-aix5.h \
235         m_syswrap/priv_syswrap-darwin.h \
236         m_syswrap/priv_syswrap-main.h \
237         m_ume/priv_ume.h
238
239 #----------------------------------------------------------------------------
240 # libcoregrind-<platform>.a
241 #----------------------------------------------------------------------------
242
243 BUILT_SOURCES = $(mach_user_srcs)
244 CLEANFILES    = $(mach_user_srcs) $(mach_server_srcs) $(mach_hdrs)
245
246 pkglib_LIBRARIES  = libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
247 if VGCONF_HAVE_PLATFORM_SEC
248 pkglib_LIBRARIES += libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
249 endif
250
251 COREGRIND_SOURCES_COMMON = \
252         m_commandline.c \
253         m_clientstate.c \
254         m_cpuid.S \
255         m_debugger.c \
256         m_debuglog.c \
257         m_errormgr.c \
258         m_execontext.c \
259         m_hashtable.c \
260         m_libcbase.c \
261         m_libcassert.c \
262         m_libcfile.c \
263         m_libcprint.c \
264         m_libcproc.c \
265         m_libcsetjmp.c \
266         m_libcsignal.c \
267         m_machine.c \
268         m_main.c \
269         m_mallocfree.c \
270         m_options.c \
271         m_oset.c \
272         m_redir.c \
273         m_seqmatch.c \
274         m_signals.c \
275         m_sparsewa.c \
276         m_stacks.c \
277         m_stacktrace.c \
278         m_syscall.c \
279         m_threadstate.c \
280         m_tooliface.c \
281         m_trampoline.S \
282         m_translate.c \
283         m_transtab.c \
284         m_vki.c \
285         m_vkiscnums.c \
286         m_wordfm.c \
287         m_xarray.c \
288         m_aspacehl.c \
289         m_aspacemgr/aspacemgr-common.c \
290         m_aspacemgr/aspacemgr-linux.c \
291         m_aspacemgr/aspacemgr-aix5.c \
292         m_coredump/coredump-elf.c \
293         m_coredump/coredump-macho.c \
294         m_coredump/coredump-xcoff.c \
295         m_debuginfo/misc.c \
296         m_debuginfo/d3basics.c \
297         m_debuginfo/debuginfo.c \
298         m_debuginfo/readdwarf.c \
299         m_debuginfo/readdwarf3.c \
300         m_debuginfo/readelf.c \
301         m_debuginfo/readmacho.c \
302         m_debuginfo/readpdb.c \
303         m_debuginfo/readstabs.c \
304         m_debuginfo/readxcoff.c \
305         m_debuginfo/storage.c \
306         m_debuginfo/tytypes.c \
307         m_demangle/cp-demangle.c \
308         m_demangle/cplus-dem.c \
309         m_demangle/demangle.c \
310         m_demangle/dyn-string.c \
311         m_demangle/safe-ctype.c \
312         m_dispatch/dispatch-x86-linux.S \
313         m_dispatch/dispatch-amd64-linux.S \
314         m_dispatch/dispatch-ppc32-linux.S \
315         m_dispatch/dispatch-ppc64-linux.S \
316         m_dispatch/dispatch-arm-linux.S \
317         m_dispatch/dispatch-s390x-linux.S \
318         m_dispatch/dispatch-ppc32-aix5.S \
319         m_dispatch/dispatch-ppc64-aix5.S \
320         m_dispatch/dispatch-x86-darwin.S \
321         m_dispatch/dispatch-amd64-darwin.S \
322         m_gdbserver/m_gdbserver.c \
323         m_gdbserver/inferiors.c \
324         m_gdbserver/m_gdbserver.c \
325         m_gdbserver/regcache.c \
326         m_gdbserver/remote-utils.c \
327         m_gdbserver/server.c \
328         m_gdbserver/signals.c \
329         m_gdbserver/target.c \
330         m_gdbserver/utils.c \
331         m_gdbserver/valgrind-low.c \
332         m_gdbserver/valgrind-low-x86.c \
333         m_gdbserver/valgrind-low-amd64.c \
334         m_gdbserver/valgrind-low-arm.c \
335         m_gdbserver/valgrind-low-ppc32.c \
336         m_gdbserver/valgrind-low-ppc64.c \
337         m_gdbserver/valgrind-low-s390x.c \
338         m_gdbserver/version.c \
339         m_initimg/initimg-linux.c \
340         m_initimg/initimg-aix5.c \
341         m_initimg/initimg-darwin.c \
342         m_initimg/initimg-pathscan.c \
343         m_mach/mach_basics.c \
344         m_mach/mach_msg.c \
345         m_mach/mach_traps-x86-darwin.S \
346         m_mach/mach_traps-amd64-darwin.S \
347         m_replacemalloc/replacemalloc_core.c \
348         m_scheduler/scheduler.c \
349         m_scheduler/sema.c \
350         m_sigframe/sigframe-x86-linux.c \
351         m_sigframe/sigframe-amd64-linux.c \
352         m_sigframe/sigframe-ppc32-linux.c \
353         m_sigframe/sigframe-ppc64-linux.c \
354         m_sigframe/sigframe-arm-linux.c \
355         m_sigframe/sigframe-s390x-linux.c \
356         m_sigframe/sigframe-ppc32-aix5.c \
357         m_sigframe/sigframe-ppc64-aix5.c \
358         m_sigframe/sigframe-x86-darwin.c \
359         m_sigframe/sigframe-amd64-darwin.c \
360         m_syswrap/syscall-x86-linux.S \
361         m_syswrap/syscall-amd64-linux.S \
362         m_syswrap/syscall-ppc32-linux.S \
363         m_syswrap/syscall-ppc64-linux.S \
364         m_syswrap/syscall-arm-linux.S \
365         m_syswrap/syscall-s390x-linux.S \
366         m_syswrap/syscall-ppc32-aix5.S \
367         m_syswrap/syscall-ppc64-aix5.S \
368         m_syswrap/syscall-x86-darwin.S \
369         m_syswrap/syscall-amd64-darwin.S \
370         m_syswrap/syswrap-main.c \
371         m_syswrap/syswrap-generic.c \
372         m_syswrap/syswrap-linux.c \
373         m_syswrap/syswrap-linux-variants.c \
374         m_syswrap/syswrap-aix5.c \
375         m_syswrap/syswrap-darwin.c \
376         m_syswrap/syswrap-x86-linux.c \
377         m_syswrap/syswrap-amd64-linux.c \
378         m_syswrap/syswrap-ppc32-linux.c \
379         m_syswrap/syswrap-ppc64-linux.c \
380         m_syswrap/syswrap-arm-linux.c \
381         m_syswrap/syswrap-s390x-linux.c \
382         m_syswrap/syswrap-ppc32-aix5.c \
383         m_syswrap/syswrap-ppc64-aix5.c \
384         m_syswrap/syswrap-x86-darwin.c \
385         m_syswrap/syswrap-amd64-darwin.c \
386         m_ume/elf.c \
387         m_ume/macho.c \
388         m_ume/main.c \
389         m_ume/script.c
390
391 if VGCONF_OS_IS_L4RE
392 COREGRIND_SOURCES_COMMON += \
393         l4re_helper.c \
394         l4re_trampoline.c \
395         l4re/vcap.cpp \
396         l4re/rm_init.cpp \
397         l4re/crt1.S \
398         l4re/__c_main.c \
399         l4re/myelf.c \
400         l4re/fd_names.cpp \
401         m_aspacemgr/aspacemgr-l4re.c \
402         m_syswrap/syswrap-x86-l4re.c \
403         m_syswrap/syswrap-l4re.c \
404         m_initimg/initimg-l4re.c \
405         m_dispatch/dispatch-x86-l4re.S
406 endif
407
408 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_DEPENDENCIES = blub.o
409 #libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_LIBADD = blub.o
410
411 blub.o : libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a-l4re_trampoline.o
412         $(LD) -r -T$(top_srcdir)/coregrind/l4re_trampoline.ld $< -o $@
413         cp $@ $<
414         touch $@
415
416 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
417     $(COREGRIND_SOURCES_COMMON)
418
419 nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
420     $(BUILT_SOURCES)
421 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
422     $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
423 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
424     $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
425 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
426     $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
427 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CXXFLAGS = \
428     $(AM_CXXFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
429 if VGCONF_HAVE_PLATFORM_SEC
430 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
431     $(COREGRIND_SOURCES_COMMON)
432 nodist_libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
433     $(BUILT_SOURCES)
434 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
435     $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
436 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
437     $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
438 libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CCASFLAGS = \
439     $(AM_CCASFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
440 endif
441
442 libcoregrind_ppc32_aix5_a_AR = $(AR) -X32 cru
443 libcoregrind_ppc64_aix5_a_AR = $(AR) -X64 cru
444
445 #----------------------------------------------------------------------------
446 # libreplacemalloc_toolpreload-<platform>.a
447 #----------------------------------------------------------------------------
448
449 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
450 if VGCONF_HAVE_PLATFORM_SEC
451 pkglib_LIBRARIES += libreplacemalloc_toolpreload-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
452 endif
453
454 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
455         m_replacemalloc/vg_replace_malloc.c
456 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
457         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
458 libreplacemalloc_toolpreload_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
459         $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC)
460 if VGCONF_HAVE_PLATFORM_SEC
461 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
462         m_replacemalloc/vg_replace_malloc.c
463 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
464         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
465 libreplacemalloc_toolpreload_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
466         $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC)
467 endif
468
469 # Special AR for AIX.
470 libreplacemalloc_toolpreload_ppc32_aix5_a_AR = $(AR) -X32 cru
471 libreplacemalloc_toolpreload_ppc64_aix5_a_AR = $(AR) -X64 cru
472
473 #----------------------------------------------------------------------------
474 # vgpreload_core-<platform>.a
475 #----------------------------------------------------------------------------
476
477 noinst_PROGRAMS  = vgpreload_core-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
478 if VGCONF_HAVE_PLATFORM_SEC
479 noinst_PROGRAMS += vgpreload_core-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
480 endif
481
482 if VGCONF_OS_IS_DARWIN
483 noinst_DSYMS = $(noinst_PROGRAMS)
484 endif
485
486 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
487 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
488         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
489 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
490         $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC)
491 vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
492         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
493 if VGCONF_HAVE_PLATFORM_SEC
494 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
495 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
496         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
497 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
498         $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC)
499 vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
500         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
501 endif
502
503 #----------------------------------------------------------------------------
504 # gdbserver xml target descriptions
505 #----------------------------------------------------------------------------
506 pkglib_DATA =
507
508 if VGCONF_ARCHS_INCLUDE_ARM
509 pkglib_DATA +=  m_gdbserver/arm-core-valgrind-s1.xml \
510                 m_gdbserver/arm-core-valgrind-s2.xml \
511                 m_gdbserver/arm-core.xml \
512                 m_gdbserver/arm-vfpv3-valgrind-s1.xml \
513                 m_gdbserver/arm-vfpv3-valgrind-s2.xml \
514                 m_gdbserver/arm-vfpv3.xml \
515                 m_gdbserver/arm-with-vfpv3-valgrind.xml \
516                 m_gdbserver/arm-with-vfpv3.xml
517 endif
518
519 if VGCONF_ARCHS_INCLUDE_X86
520 pkglib_DATA +=  m_gdbserver/32bit-core-valgrind-s1.xml \
521                 m_gdbserver/32bit-core-valgrind-s2.xml \
522                 m_gdbserver/32bit-core.xml \
523                 m_gdbserver/32bit-sse-valgrind-s1.xml \
524                 m_gdbserver/32bit-sse-valgrind-s2.xml \
525                 m_gdbserver/32bit-sse.xml
526 if VGCONF_OS_IS_LINUX
527 pkglib_DATA +=  m_gdbserver/32bit-linux-valgrind-s1.xml \
528                 m_gdbserver/32bit-linux-valgrind-s2.xml \
529                 m_gdbserver/32bit-linux.xml \
530                 m_gdbserver/i386-linux-valgrind.xml
531 endif
532 if VGCONF_OS_IS_DARWIN
533 pkglib_DATA +=  m_gdbserver/i386-coresse-valgrind.xml
534 endif
535 endif
536
537 if VGCONF_ARCHS_INCLUDE_AMD64
538 pkglib_DATA +=  m_gdbserver/64bit-core-valgrind-s1.xml \
539                 m_gdbserver/64bit-core-valgrind-s2.xml \
540                 m_gdbserver/64bit-core.xml \
541                 m_gdbserver/64bit-sse-valgrind-s1.xml \
542                 m_gdbserver/64bit-sse-valgrind-s2.xml \
543                 m_gdbserver/64bit-sse.xml
544
545 if VGCONF_OS_IS_LINUX
546 pkglib_DATA +=  m_gdbserver/64bit-linux-valgrind-s1.xml \
547                 m_gdbserver/64bit-linux-valgrind-s2.xml \
548                 m_gdbserver/64bit-linux.xml \
549                 m_gdbserver/amd64-linux-valgrind.xml
550 endif
551 if VGCONF_OS_IS_DARWIN
552 pkglib_DATA +=  m_gdbserver/amd64-coresse-valgrind.xml
553 endif
554 endif
555
556 if VGCONF_ARCHS_INCLUDE_PPC32
557 pkglib_DATA +=  m_gdbserver/power-altivec-valgrind-s1.xml \
558                 m_gdbserver/power-altivec-valgrind-s2.xml \
559                 m_gdbserver/power-altivec.xml \
560                 m_gdbserver/power-core.xml \
561                 m_gdbserver/power-fpu-valgrind-s1.xml \
562                 m_gdbserver/power-fpu-valgrind-s2.xml \
563                 m_gdbserver/power-fpu.xml \
564                 m_gdbserver/power-linux-valgrind-s1.xml \
565                 m_gdbserver/power-linux-valgrind-s2.xml \
566                 m_gdbserver/power-linux.xml \
567                 m_gdbserver/powerpc-altivec32l-valgrind.xml \
568                 m_gdbserver/powerpc-altivec32l.xml
569 endif
570
571 if VGCONF_ARCHS_INCLUDE_PPC64
572 pkglib_DATA +=  m_gdbserver/power64-core-valgrind-s1.xml \
573                 m_gdbserver/power64-core-valgrind-s2.xml \
574                 m_gdbserver/power64-core.xml \
575                 m_gdbserver/power64-linux-valgrind-s1.xml \
576                 m_gdbserver/power64-linux-valgrind-s2.xml \
577                 m_gdbserver/power64-linux.xml \
578                 m_gdbserver/powerpc-altivec64l-valgrind.xml \
579                 m_gdbserver/powerpc-altivec64l.xml
580 if ! VGCONF_ARCHS_INCLUDE_PPC32
581 pkglib_DATA +=  m_gdbserver/power-altivec-valgrind-s1.xml \
582                 m_gdbserver/power-altivec-valgrind-s2.xml \
583                 m_gdbserver/power-altivec.xml \
584                 m_gdbserver/power-fpu-valgrind-s1.xml \
585                 m_gdbserver/power-fpu-valgrind-s2.xml \
586                 m_gdbserver/power-fpu.xml
587 endif
588 endif
589
590
591 #----------------------------------------------------------------------------
592 # General stuff
593 #----------------------------------------------------------------------------
594
595 all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
596         mkdir -p $(inplacedir); \
597         for f in $(pkglib_DATA); do \
598           rm -f $(inplacedir)/$$f; \
599           ln -f -s ../$(subdir)/$$f $(inplacedir); \
600         done
601
602 clean-local: clean-noinst_DSYMS
603
604 install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
605
606 #----------------------------------------------------------------------------
607 # Darwin linker kludges
608 #----------------------------------------------------------------------------
609
610 if VGCONF_OS_IS_DARWIN
611
612 BUILT_SOURCES += fixup_macho_loadcmds
613 fixup_macho_loadcmds: fixup_macho_loadcmds.c
614         $(CC) -g -Wall -o fixup_macho_loadcmds fixup_macho_loadcmds.c
615
616 CLEANFILES += fixup_macho_loadcmds
617
618 endif
619
620 EXTRA_DIST += fixup_macho_loadcmds.c