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