LINE=64
L1=4096
L1A=4
LL=16384
LLA=8
task2: task2.o main.o
cc -g -static -o $@ $^
task2.o: task2.c
cc -g -c -O2 -o $@ $^
main.o: main.c
cc -g -c -O2 -o $@ $^
.PHONY: run
run: task2
valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} ./task2
.PHONY: detailed
detailed: task2
valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} --cachegrind-out-file=stats.cgout ./task2
cg_annotate --auto=yes --show-percs=no stats.cgout | tee stats.rep
.PHONY: clean
clean:
rm -f *.o cachegrind.out.* *.cgout *.rep task2