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