-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
68 lines (43 loc) · 1.41 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
65
66
67
68
##############################################################
#
# DO NOT EDIT THIS FILE!
#
##############################################################
# If the tool is built out of the kit, PIN_ROOT must be specified in the make invocation and point to the kit root.
ifndef PIN_HOME
PIN_HOME = /opt/pin
endif
MYVER=$(shell $(PIN_HOME)/pin -version |grep Pin)
ifeq ($(MYVER), Pin 2.10) # old pin versions use different makefile system
TOOL_CXXFLAGS += -Wall -g -std=c++0x -Wno-error
TOOL_ROOTS := tabarnac
PIN_KIT=$(PIN_HOME)
KIT=1
include $(PIN_HOME)/source/tools/makefile.gnu.config
CXXFLAGS ?= $(DBG) $(OPT) $(TOOL_CXXFLAGS)
PIN=$(PIN_HOME)/pin
CXX=g++-4.6
TOOLS = $(TOOL_ROOTS:%=$(OBJDIR)%$(PINTOOL_SUFFIX))
all: tools
tools: $(OBJDIR) $(TOOLS)
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(PIN_CXXFLAGS) ${OUTOPT}$@ $<
$(TOOLS): %$(PINTOOL_SUFFIX) : %.o
${PIN_LD} $(PIN_LDFLAGS) $(LINK_DEBUG) ${LINK_OUT}$@ $< ${PIN_LPATHS} $(PIN_LIBS) $(DBG)
clean:
rm -rf $(OBJDIR)
else # new pin versions
override PIN_ROOT = $(PIN_HOME)
ifdef PIN_ROOT
CONFIG_ROOT := $(PIN_ROOT)/source/tools/Config
else
CONFIG_ROOT := ../Config
endif
include $(CONFIG_ROOT)/makefile.config
TOOL_CXXFLAGS += -Wall -g -std=c++0x -Wno-error
TOOL_LDFLAGS += -Wl,-rpath,$(PIN_HOME)/intel64/runtime -lelf
TEST_TOOL_ROOTS := tabarnac
include $(TOOLS_ROOT)/Config/makefile.default.rules
endif