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_clientobj.c       \
     58   drd_clientreq.c       \
     59   drd_cond.c            \
     60   drd_cond_initializer.c \
     61   drd_error.c           \
     62   drd_hb.c              \
     63   drd_load_store.c      \
     64   drd_main.c            \
     65   drd_malloc_wrappers.c \
     66   drd_mutex.c           \
     67   drd_rwlock.c          \
     68   drd_semaphore.c       \
     69   drd_suppression.c
     70 
     71 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES      = \
     72 	$(DRD_SOURCES_COMMON)
     73 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS     = \
     74 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
     75 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS       = \
     76 	$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(DRD_CFLAGS)
     77 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \
     78 	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@)
     79 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD        = \
     80 	$(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@)
     81 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS      = \
     82 	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
     83 drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
     84 	$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
     85 	@VALT_LOAD_ADDRESS_PRI@ \
     86 	$(LINK) \
     87 	$(drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
     88 	$(drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS)
     89 
     90 if VGCONF_HAVE_PLATFORM_SEC
     91 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES      = \
     92 	$(DRD_SOURCES_COMMON)
     93 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS     = \
     94 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
     95 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS       = \
     96 	$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(DRD_CFLAGS)
     97 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \
     98 	$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@)
     99 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD        = \
    100 	$(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@)
    101 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS      = \
    102 	$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    103 drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
    104 	$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
    105 	@VALT_LOAD_ADDRESS_SEC@ \
    106 	$(LINK) \
    107 	$(drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
    108 	$(drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
    109 endif
    110 
    111 #----------------------------------------------------------------------------
    112 # vgpreload_drd-<platform>.so
    113 #----------------------------------------------------------------------------
    114 
    115 noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
    116 if VGCONF_HAVE_PLATFORM_SEC
    117 noinst_PROGRAMS += vgpreload_drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
    118 endif
    119 
    120 if VGCONF_OS_IS_DARWIN
    121 noinst_DSYMS = $(noinst_PROGRAMS)
    122 endif
    123 
    124 VGPRELOAD_DRD_SOURCES_COMMON = \
    125   drd_pthread_intercepts.c     \
    126   drd_qtcore_intercepts.c      \
    127   drd_strmem_intercepts.c
    128 
    129 if VGCONF_OS_IS_DARWIN
    130 VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c
    131 endif
    132 
    133 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES      = \
    134 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    135 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS     = \
    136 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    137 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS       = \
    138 	$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC) $(DRD_CFLAGS)
    139 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
    140 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
    141 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS      = \
    142 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
    143 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    144 
    145 if VGCONF_HAVE_PLATFORM_SEC
    146 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES      = \
    147 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    148 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS     = \
    149 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    150 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS       = \
    151 	$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC) $(DRD_CFLAGS)
    152 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
    153 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
    154 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS      = \
    155 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
    156 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    157 endif
    158 
    159