-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.rules
76 lines (60 loc) · 3.18 KB
/
makefile.rules
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
69
70
71
72
73
74
75
76
CC = g++
TOOL_CXXFLAGS_NOOPT += -std=c++0x #-ggdb
LIBS += -llibdft
TOOL_CXXFLAGS += -g -Isrc/ -Wno-unused-but-set-variable -Wno-unused-but-set-variable
LIB_SRC_DIR = src/
TOOL_SRC_DIR = tools/
LIB_ROOTS += liblibdft
TOOL_ROOTS += taint_from_file_read nullpin #trace_routines sqlite_pintool
$(OBJDIR)liblibdft$(LIB_SUFFIX): \
$(OBJDIR)libdft_api$(OBJ_SUFFIX) \
$(OBJDIR)libdft_analysis$(OBJ_SUFFIX) \
$(OBJDIR)syscall_desc$(OBJ_SUFFIX) \
$(OBJDIR)tagmap$(OBJ_SUFFIX) \
$(OBJDIR)libdft_instrument$(OBJ_SUFFIX)
$(ARCHIVER) $(OBJDIR)liblibdft$(LIB_SUFFIX) \
$(OBJDIR)tagmap$(OBJ_SUFFIX) $(OBJDIR)libdft_api$(OBJ_SUFFIX) \
$(OBJDIR)libdft_analysis$(OBJ_SUFFIX) \
$(OBJDIR)syscall_desc$(OBJ_SUFFIX) \
$(OBJDIR)libdft_instrument$(OBJ_SUFFIX)
$(OBJDIR)libdft_api$(OBJ_SUFFIX): $(LIB_SRC_DIR)libdft_api.c \
$(LIB_SRC_DIR)libdft_api.h $(LIB_SRC_DIR)branch_pred.h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)libdft_instrument$(OBJ_SUFFIX): $(LIB_SRC_DIR)libdft_instrument.c \
$(LIB_SRC_DIR)libdft_instrument.h $(LIB_SRC_DIR)branch_pred.h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)libdft_analysis$(OBJ_SUFFIX): $(LIB_SRC_DIR)libdft_analysis.c \
$(LIB_SRC_DIR)libdft_analysis.h $(LIB_SRC_DIR)branch_pred.h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)syscall_desc$(OBJ_SUFFIX): $(LIB_SRC_DIR)syscall_desc.c \
$(LIB_SRC_DIR)syscall_desc.h $(LIB_SRC_DIR)branch_pred.h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)tagmap$(OBJ_SUFFIX): $(LIB_SRC_DIR)tagmap.c $(LIB_SRC_DIR)tagmap.h \
$(LIB_SRC_DIR)branch_pred.h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the intermediate object file.
$(OBJDIR)taint_from_file_read$(OBJ_SUFFIX): $(TOOL_SRC_DIR)taint_from_file_read.c \
$(LIB_SRC_DIR)branch_pred.h
$(CC) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the tool as a dll (shared object).
$(OBJDIR)taint_from_file_read$(PINTOOL_SUFFIX): $(OBJDIR)taint_from_file_read$(OBJ_SUFFIX)
$(LINKER) $(TOOL_LDFLAGS) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS) $(LIBS)
# Build the intermediate object file.
$(OBJDIR)nullpin$(OBJ_SUFFIX): $(TOOL_SRC_DIR)nullpin.c $(LIB_SRC_DIR)branch_pred.h
$(CC) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the tool as a dll (shared object).
$(OBJDIR)nullpin$(PINTOOL_SUFFIX): $(OBJDIR)nullpin$(OBJ_SUFFIX)
$(LINKER) $(TOOL_LDFLAGS) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS) $(LIBS)
# Build the intermediate object file.
$(OBJDIR)trace_routines$(OBJ_SUFFIX): $(TOOL_SRC_DIR)trace_routines.c $(LIB_SRC_DIR)branch_pred.h
$(CC) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the tool as a dll (shared object).
$(OBJDIR)trace_routines$(PINTOOL_SUFFIX): $(OBJDIR)trace_routines$(OBJ_SUFFIX)
$(LINKER) $(TOOL_LDFLAGS) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS) $(LIBS)
# Build the intermediate object file.
$(OBJDIR)sqlite_pintool$(OBJ_SUFFIX): $(TOOL_SRC_DIR)sqlite_pintool.c \
$(LIB_SRC_DIR)branch_pred.h
$(CC) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the tool as a dll (shared object).
$(OBJDIR)sqlite_pintool$(PINTOOL_SUFFIX): $(OBJDIR)sqlite_pintool$(OBJ_SUFFIX)
$(LINKER) $(TOOL_LDFLAGS) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS) $(LIBS)