-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
53 lines (38 loc) · 1.04 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
PINTOOL = IFR_PinDriver.so
MARKDOWN = /usr/bin/markdown
SRCS = IFR_BasicBlock.cpp IFR_MemoryRef.cpp
BLDTYPE=pin
ifeq ($(BLDTYPE),pin)
PIN_KIT=$(PIN_HOME)
KIT=1
include $(PIN_HOME)/source/tools/makefile.gnu.config
CXXFLAGS += -DPIN
SRCS += IFR_PinDriver.cpp
TARG = $(PINTOOL)
else
CXXFLAGS += -UPIN
LDFLAGS = -lpthread -ldl
SRCS += CacheTestDriver.cpp
TARG = $(PROG)
endif
CXXFLAGS += -I. -g -O0 -Wno-deprecated
OBJS = $(SRCS:%.cpp=%.o)
FACOBJS = $(FACSRCS:%.cpp=%.so)
all: $(TARG)
## build rules
%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(PIN_CXXFLAGS) -o $@ $<
%.so : %.cpp
$(CXX) -fPIC -shared $(CXXFLAGS) $(PIN_CXXFLAGS) -o $@ $< SMPCache.cpp Snippets.cpp nanassert.cpp
$(PROG): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $+ $(DBG)
$(PINTOOL): $(OBJS)
$(CXX) $(PIN_LDFLAGS) $(LDFLAGS) -o $@ $+ $(PIN_LIBS) $(DBG)
doc: README $(MARKDOWN)
echo "<html><head><title>MultiCacheSim Documentation</title></head><body>" >README.html
$(MARKDOWN) README >> README.html
echo "</body></html>" >> README.html
## cleaning
clean:
-rm -f *.o $(PROG) $(PINTOOL)
-include *.d