-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
55 lines (46 loc) · 1010 Bytes
/
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
CC=cc
CANTERBURY = \
alice29.txt \
asyoulik.txt \
cp.html \
fields.c \
grammar.lsp \
kennedy.xls \
lcet10.txt \
plrabn12.txt \
ptt5 \
sum \
xargs.1
SILESA = \
dickens \
mozilla \
mr \
nci \
ooffice \
osdb \
reymont \
samba \
sao \
webster \
xml \
x-ray
LTCB = \
enwik8
SNAPPY = \
fireworks.jpeg \
geo.protodata \
paper-100k.pdf \
urls.10K
DATA = \
$(CANTERBURY) \
$(SILESA) \
$(LTCB) \
$(SNAPPY)
all: data.csv
%:: %.xz
squash -kdc xz $^ $@
benchmark: benchmark.c timer.c
$(CC) -Wall -Wextra -g -o benchmark $^ `pkg-config --libs --cflags squash-0.8`
data.csv: benchmark $(DATA)
@if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor -a "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`" != "performance" ]; then echo -e "WARNING: You should switch to the 'performance' CPU governor by running\n\n\tsu -c 'echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'\n"; fi
./benchmark -o $@ $(sort $(DATA)) 2>&1 | tee result.log