summaryrefslogtreecommitdiff
path: root/config/pintool_static.mpb
blob: e9301b225331f528fed852d4c224dc684ce5b5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
project : pin_static {
  verbatim (make, top) {
    no_hidden_visibility = 1
  }

  verbatim (gnuace, top) {
    no_hidden_visibility = 1
  }

  verbatim (make, macros) {
    ifeq ($(shell uname -s), Darwin)
      CPPFLAGS += -DTARGET_MAC
      LDFLAGS  -= -lpthread
    else
      CPPFLAGS += -DTARGET_LINUX
      LDFLAGS  += -Wl,--hash-style=sysv -Wl,-Bsymbolic
      LDFLAGS  -= -ldl -lpthread
      LDLIBS   += -lpindwarf -ldl
    endif
  }

  verbatim (gnuace, macros) {
    ifeq ($(shell uname -s), Darwin)
      CPPFLAGS += -DTARGET_MAC
      LDFLAGS  -= -lpthread
    else
      # TODO Add support for linking against gcc libraries included with Pin
      CPPFLAGS += -DTARGET_LINUX
      LIBS     += -lpindwarf
      LDFLAGS  += -Wl,--hash-style=sysv -Wl,-Bsymbolic
    endif
  }
}