1include $(top_srcdir)/Makefile.tool.am
2
3EXTRA_DIST = docs/drd-manual.xml docs/drd-xml-output.xsd
4
5#----------------------------------------------------------------------------
6# Headers, flags
7#----------------------------------------------------------------------------
8
9pkginclude_HEADERS = drd.h
10
11noinst_HEADERS =        \
12  drd_barrier.h         \
13  drd_basics.h          \
14  drd_bitmap.c          \
15  drd_bitmap.h          \
16  drd_clientobj.h       \
17  drd_clientreq.h       \
18  drd_cond.h            \
19  drd_error.h           \
20  drd_hb.h              \
21  drd_load_store.h      \
22  drd_malloc_wrappers.h \
23  drd_mutex.h           \
24  drd_rwlock.h          \
25  drd_segment.c         \
26  drd_segment.h         \
27  drd_semaphore.h       \
28  drd_suppression.h     \
29  drd_thread.c          \
30  drd_thread.h          \
31  drd_thread_bitmap.h   \
32  drd_vc.c              \
33  drd_vc.h              \
34  pub_drd_bitmap.h
35
36DRD_CFLAGS =				\
37  @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@	\
38  -O2					\
39  @FLAG_W_EXTRA@			\
40  -Wformat-nonliteral			\
41  -Wswitch-enum			        \
42  -Wno-inline				\
43  -Wno-unused-parameter
44
45#DRD_CFLAGS += -DENABLE_DRD_CONSISTENCY_CHECKS
46
47#----------------------------------------------------------------------------
48# drd-<platform>
49#----------------------------------------------------------------------------
50
51noinst_PROGRAMS  = drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@
52if VGCONF_HAVE_PLATFORM_SEC
53noinst_PROGRAMS += drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@
54endif
55
56DRD_SOURCES_COMMON =    \
57  drd_barrier.c         \
58  drd_clientobj.c       \
59  drd_clientreq.c       \
60  drd_cond.c            \
61  drd_cond_initializer.c \
62  drd_error.c           \
63  drd_hb.c              \
64  drd_load_store.c      \
65  drd_main.c            \
66  drd_malloc_wrappers.c \
67  drd_mutex.c           \
68  drd_rwlock.c          \
69  drd_semaphore.c       \
70  drd_suppression.c
71
72drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES      = \
73	$(DRD_SOURCES_COMMON)
74drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS     = \
75	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
76drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS       = \
77	$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(DRD_CFLAGS)
78drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \
79	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@)
80drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD        = \
81	$(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@)
82drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS      = \
83	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
84drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
85	$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
86	@VALT_LOAD_ADDRESS_PRI@ \
87	$(LINK) \
88	$(drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
89	$(drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS)
90
91if VGCONF_HAVE_PLATFORM_SEC
92drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES      = \
93	$(DRD_SOURCES_COMMON)
94drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS     = \
95	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
96drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS       = \
97	$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(DRD_CFLAGS)
98drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \
99	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@)
100drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD        = \
101	$(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@)
102drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS      = \
103	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
104drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
105	$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
106	@VALT_LOAD_ADDRESS_SEC@ \
107	$(LINK) \
108	$(drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
109	$(drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
110endif
111
112#----------------------------------------------------------------------------
113# vgpreload_drd-<platform>.so
114#----------------------------------------------------------------------------
115
116noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
117if VGCONF_HAVE_PLATFORM_SEC
118noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
119endif
120
121if VGCONF_OS_IS_DARWIN
122noinst_DSYMS = $(noinst_PROGRAMS)
123endif
124
125VGPRELOAD_DRD_SOURCES_COMMON = \
126  drd_libstdcxx_intercepts.c   \
127  drd_pthread_intercepts.c     \
128  drd_qtcore_intercepts.c      \
129  drd_strmem_intercepts.c
130
131if VGCONF_OS_IS_DARWIN
132VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c
133endif
134
135vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES      = \
136	$(VGPRELOAD_DRD_SOURCES_COMMON)
137vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS     = \
138	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
139vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS       = \
140	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@) $(DRD_CFLAGS)
141vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
142	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
143vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS      = \
144	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
145	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
146
147if VGCONF_HAVE_PLATFORM_SEC
148vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES      = \
149	$(VGPRELOAD_DRD_SOURCES_COMMON)
150vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS     = \
151	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
152vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS       = \
153	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@) $(DRD_CFLAGS)
154vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
155	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
156vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS      = \
157	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
158	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
159endif
160
161