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