-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.competition
More file actions
76 lines (56 loc) · 1.96 KB
/
Makefile.competition
File metadata and controls
76 lines (56 loc) · 1.96 KB
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
##
## PIN tools
##
default: CMPsim64
##############################################################
#
# Here are some things you might want to configure
#
##############################################################
EXT=
TARGET_COMPILER?=gnu
##############################################################
#
# Common Flags
#
##############################################################
GZSTREAM ?= 1
MYLIBS ?=
COMMON_FLAGS ?= $(CMDLINE) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DCRC_KIT=1
##############################################################
#
# Compiler Specific Flags
#
##############################################################
ifeq ($(TARGET_COMPILER),gnu)
include pinkit/pin-2.7-31933-gcc.3.4.6-ia32_intel64-linux/source/tools/makefile.gnu.config
LINKER?=${CXX}
DBG?= -g
OPT=-O3 -fomit-frame-pointer -funroll-all-loops -ffast-math -fno-exceptions
CXXFLAGS = $(COMMON_FLAGS) -Wall -Werror -Wno-unknown-pragmas $(OPT) $(DBG)
EEXT = $(EXT)
endif
##############################################################
#
# Tools Sources
#
##############################################################
LLC_OBJS = ./src/LLCsim/crc_cache.o \
./src/LLCsim/replacement_state.o
INCLUDES = -Isrc/LLCsim
cacheobjs: $(LLC_OBJS)
##############################################################
#
# build rules
#
##############################################################
TOOLS = bin/CMPsim$(EEXT)
%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(PIN_CXXFLAGS) $(INCLUDES) ${OUTOPT}$@ $<
CMPsim32: clean cacheobjs
$(LINKER) -Wl,-u,main $(PIN_SALDFLAGS) $(LINK_DEBUG) ${LINK_OUT}bin/CMPsim.usetrace.32 ./bin/libCMPsim.32.a $(LLC_OBJS) ${PIN_LPATHS} $(SAPIN_LIBS) /usr/local/lib/libz.a
CMPsim64: clean cacheobjs
$(LINKER) -Wl,-u,main $(PIN_SALDFLAGS) $(LINK_DEBUG) ${LINK_OUT}bin/CMPsim.usetrace.64 ./bin/libCMPsim.64.a $(LLC_OBJS) ${PIN_LPATHS} $(SAPIN_LIBS) /usr/local/lib/libz.a
## cleaning
clean:
-rm -f *.o $(TOOLS) *.out *.tested *.failed $(LLC_OBJS)