-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (35 loc) · 1.33 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
subdirs=libarchlab cache_control pin-tools examples tools
.PHONY: $(subdirs)
all: $(subdirs) $(EXAMPLES)
clean: $(subdirs)
ifndef ARCHLAB_ROOT
$(error ARCHLAB_ROOT is not set. Have you sourced config.sh? Maybe do it again.)
endif
ifndef PIN_ROOT
$(error PIN_ROOT is not set. Have you sourced config.sh? Maybe do it again.)
endif
$(subdirs):
make -C $@ $(MAKECMDGOALS) PIN_ROOT=$(PWD)/pin-3.11-97998-g7ecce2dac-gcc-linux
install-papi:
curl http://icl.utk.edu/projects/papi/downloads/papi-5.7.0.tar.gz -o papi-5.7.0.tar.gz
tar xzf papi-5.7.0.tar.gz
(cd papi-5.7.0/src; ./configure --with-components=rapl; make; make install; make install-man)
install-pin:
curl https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz -o pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz
tar xzf pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz
install: install-prereqs
install-prereqs: create-venv install-papi install-pin install-pcm
create-venv:
rm -rf archcloud/venv
virtualenv -p `which python3` archcloud/venv
(. archcloud/venv/bin/activate; cd archcloud/; pip install -e .)
install-pcm:
(git clone https://github.com/opcm/pcm.git; cd pcm; make)
setup:
insmod cache_control/cache_control.ko
modprobe msr
test:
$(MAKE) -C tests test
$(MAKE) -C archcloud test
$(MAKE) -C tools test
include compile.make