Home | History | Annotate | Download | only in drd
      1 include $(top_srcdir)/Makefile.tool.am
      2 
      3 EXTRA_DIST = docs/drd-manual.xml docs/drd-xml-output.xsd
      4 
      5 #----------------------------------------------------------------------------
      6 # Headers, flags
      7 #----------------------------------------------------------------------------
      8 
      9 pkginclude_HEADERS = drd.h
     10 
     11 noinst_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 
     36 DRD_CFLAGS =				\
     37   @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@	\
     38   -O2					\
     39   @FLAG_W_EXTRA@			\
     40   -Wformat-nonliteral			\
     41   -Wno-inline				\
     42   -Wno-unused-parameter
     43 
     44 #DRD_CFLAGS += -DENABLE_DRD_CONSISTENCY_CHECKS
     45 
     46 #----------------------------------------------------------------------------
     47 # drd-<platform>
     48 #----------------------------------------------------------------------------
     49 
     50 noinst_PROGRAMS  = drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@
     51 if VGCONF_HAVE_PLATFORM_SEC
     52 noinst_PROGRAMS += drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@
     53 endif
     54 
     55 DRD_SOURCES_COMMON =    \
     56   drd_barrier.c         \
     57   drd_bitmap2_node.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 
     72 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES      = \
     73 	$(DRD_SOURCES_COMMON)
     74 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS     = \
     75 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
     76 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS       = \
     77 	$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(DRD_CFLAGS)
     78 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \
     79 	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@)
     80 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD        = \
     81 	$(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@)
     82 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS      = \
     83 	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
     84 drd_@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 
     91 if VGCONF_HAVE_PLATFORM_SEC
     92 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES      = \
     93 	$(DRD_SOURCES_COMMON)
     94 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS     = \
     95 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
     96 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS       = \
     97 	$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(DRD_CFLAGS)
     98 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \
     99 	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@)
    100 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD        = \
    101 	$(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@)
    102 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS      = \
    103 	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    104 drd_@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)
    110 endif
    111 
    112 #----------------------------------------------------------------------------
    113 # vgpreload_drd-<platform>.so
    114 #----------------------------------------------------------------------------
    115 
    116 noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
    117 if VGCONF_HAVE_PLATFORM_SEC
    118 noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
    119 endif
    120 
    121 if VGCONF_OS_IS_DARWIN
    122 noinst_DSYMS = $(noinst_PROGRAMS)
    123 endif
    124 
    125 VGPRELOAD_DRD_SOURCES_COMMON = \
    126   drd_pthread_intercepts.c     \
    127   drd_qtcore_intercepts.c      \
    128   drd_strmem_intercepts.c
    129 
    130 if VGCONF_OS_IS_DARWIN
    131 VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c
    132 endif
    133 
    134 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES      = \
    135 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    136 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS     = \
    137 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    138 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS       = \
    139 	$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC) $(DRD_CFLAGS)
    140 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
    141 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
    142 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS      = \
    143 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
    144 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    145 
    146 if VGCONF_HAVE_PLATFORM_SEC
    147 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES      = \
    148 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    149 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS     = \
    150 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    151 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS       = \
    152 	$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC) $(DRD_CFLAGS)
    153 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
    154 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
    155 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS      = \
    156 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
    157 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    158 endif
    159 
    160