-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
65 lines (46 loc) · 1.46 KB
/
makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
##
## PIN tools
##
##############################################################
#
# Here are some things you might want to configure
#
##############################################################
TARGET_COMPILER?=gnu
ifdef OS
ifeq (${OS},Windows_NT)
TARGET_COMPILER=ms
endif
endif
##############################################################
#
# include *.config files
#
##############################################################
ifeq ($(TARGET_COMPILER),gnu)
include ../makefile.gnu.config
OPT=-g
CXXFLAGS = -I$(PIN_HOME)/InstLib -fomit-frame-pointer -Wall -Werror -Wno-unknown-pragmas $(DBG) $(OPT) -MMD
endif
ifeq ($(TARGET_COMPILER),ms)
include ../makefile.ms.config
# DBG?=
endif
TOOL_ROOTS = pinatrace buffer-lin bb-sequence traceusage traceId cjmp-cache cjmp-sequence0 cjmp-sequence cjmp-sequence2 cjmp-sequence3 countreps \
icount5 trace-sequence traceNum bb-sequence2 edgcnt cjmp-noprint nullpin bb-sequence64 traceNum2 bb-dep bb-dep2 countreps-max bb-rep bbdep_threadpool
TOOLS = $(TOOL_ROOTS:%=$(OBJDIR)%$(PINTOOL_SUFFIX))
all: tools
tools: $(OBJDIR) $(TOOLS)
#test: $(OBJDIR) pincov.test
## build rules
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(PIN_CXXFLAGS) ${OUTOPT}$@ $<
$(TOOLS): $(PIN_LIBNAMES)
$(TOOLS): %$(PINTOOL_SUFFIX) : %.o
$(PIN_LD) $(PIN_LDFLAGS) ${LINK_OUT}$@ $< $(PIN_LIBS) $(DBG)
## cleaning
clean:
-rm -rf $(OBJDIR) *.out *.tested *.failed
-include *.d