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   -Wswitch-enum			        \
     42   -Wno-inline				\
     43   -Wno-unused-parameter
     44 
     45 #DRD_CFLAGS += -DENABLE_DRD_CONSISTENCY_CHECKS
     46 
     47 #----------------------------------------------------------------------------
     48 # drd-<platform>
     49 #----------------------------------------------------------------------------
     50 
     51 noinst_PROGRAMS  = drd-@VGCONF_ARCH_PRI@-@VGCONF_OS@
     52 if VGCONF_HAVE_PLATFORM_SEC
     53 noinst_PROGRAMS += drd-@VGCONF_ARCH_SEC@-@VGCONF_OS@
     54 endif
     55 
     56 DRD_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 
     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_libstdcxx_intercepts.c   \
    127   drd_pthread_intercepts.c     \
    128   drd_qtcore_intercepts.c      \
    129   drd_strmem_intercepts.c
    130 
    131 if VGCONF_OS_IS_DARWIN
    132 VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c
    133 endif
    134 
    135 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES      = \
    136 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    137 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS     = \
    138 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    139 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS       = \
    140 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@) $(DRD_CFLAGS)
    141 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
    142 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
    143 vgpreload_drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS      = \
    144 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
    145 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
    146 
    147 if VGCONF_HAVE_PLATFORM_SEC
    148 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES      = \
    149 	$(VGPRELOAD_DRD_SOURCES_COMMON)
    150 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS     = \
    151 	$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    152 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS       = \
    153 	$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@) $(DRD_CFLAGS)
    154 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
    155 	$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
    156 vgpreload_drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS      = \
    157 	$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
    158 	$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
    159 endif
    160 
    161