1 # $NetBSD: Makefile,v 1.2.2.2 2015/01/25 00:19:41 martin Exp $ 2 3 .include <bsd.own.mk> 4 5 .include "../Makefile.inc" 6 7 TSAN=${GCCDIST}/libsanitizer 8 .PATH: ${TSAN}/tsan ${TSAN}/interception ${TSAN}/sanitizer_common 9 10 TSAN_SRCS= \ 11 tsan_clock.cc \ 12 tsan_fd.cc \ 13 tsan_flags.cc \ 14 tsan_interceptors.cc \ 15 tsan_interface.cc \ 16 tsan_interface_ann.cc \ 17 tsan_interface_atomic.cc \ 18 tsan_interface_java.cc \ 19 tsan_md5.cc \ 20 tsan_mman.cc \ 21 tsan_mutex.cc \ 22 tsan_mutexset.cc \ 23 tsan_platform_linux.cc \ 24 tsan_platform_mac.cc \ 25 tsan_report.cc \ 26 tsan_rtl.cc \ 27 tsan_rtl_amd64.S \ 28 tsan_rtl_mutex.cc \ 29 tsan_rtl_report.cc \ 30 tsan_rtl_thread.cc \ 31 tsan_stat.cc \ 32 tsan_suppressions.cc \ 33 tsan_symbolize.cc \ 34 tsan_symbolize_addr2line_linux.cc \ 35 tsan_sync.cc 36 37 INTERCEPTION_SRCS= \ 38 interception_linux.cc \ 39 interception_type_test.cc 40 41 SANITIZER_SRCS= \ 42 sanitizer_allocator.cc \ 43 sanitizer_common.cc \ 44 sanitizer_flags.cc \ 45 sanitizer_libc.cc \ 46 sanitizer_netbsd.cc \ 47 sanitizer_mac.cc \ 48 sanitizer_posix.cc \ 49 sanitizer_platform_limits_posix.cc \ 50 sanitizer_printf.cc \ 51 sanitizer_stackdepot.cc \ 52 sanitizer_stacktrace.cc \ 53 sanitizer_symbolizer.cc \ 54 sanitizer_symbolizer_linux.cc \ 55 sanitizer_win.cc 56 57 # The linux build does this to avoid preinit sections on shared libraries 58 CSHLIBFLAGS+= -DPIC 59 60 LIB= tsan 61 SRCS= ${TSAN_SRCS} ${INTERCEPTION_SRCS} ${SANITIZER_SRCS} 62 CPPFLAGS+=-I${TSAN}/include -I${TSAN} 63 64 LDADD+= -lstdc++ -lpthread 65 DPADD+= ${LIBSTDCXX} ${LIBPTHREAD} 66 67 .include <bsd.lib.mk> 68